launch simple perl script from browser

Discussion in 'Perl Misc' started by kenny, Jan 15, 2007.

  1. kenny

    kenny Guest

    hi folks,

    i have a very basic question:

    how can i launch my perl script in the browser via address bar?

    I used a shell with the command "perl x.pl" and it worked. the paths
    seem to be set all right.... thx in advance....


    yours, kenny ajram
     
    kenny, Jan 15, 2007
    #1
    1. Advertising

  2. kenny <> wrote:

    > how can i launch my perl script in the browser



    You can't.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jan 16, 2007
    #2
    1. Advertising

  3. kenny

    Guest

    kenny wrote:
    > how can i launch my perl script in the browser via address bar?


    file://c:\path\to\x.pl


    --
    The best way to get a good answer is to ask a good question.
    David Filmer (http://DavidFilmer.com)
     
    , Jan 16, 2007
    #3
  4. kenny

    John Bokma Guest

    Tad McClellan <> wrote:

    > kenny <> wrote:
    >
    >> how can i launch my perl script in the browser

    >
    >
    > You can't.


    But I can :)

    --
    John Experienced Perl programmer: http://castleamber.com/

    Perl help, tutorials, and examples: http://johnbokma.com/perl/
     
    John Bokma, Jan 16, 2007
    #4
  5. kenny

    Guest

    On Jan 15, 7:11 pm, Tad McClellan <> wrote:
    > kenny <> wrote:
    > > how can i launch my perl script in the browser

    >
    >You can't.
    >


    You can't? But you can... Here's a tutorial that explains how you can
    take advantage of your Web Browser so you can use HTML GUIs. It also
    tells you how to you can bundle up everything in a nice EXE...

    http://simon-cozens.org/programmer/articles/webgui.pod
     
    , Jan 16, 2007
    #5
  6. kenny

    Guest

    Bob Walton wrote:

    > Well, one way would be to install a web server on your system. Modify
    > the Perl script to function as a CGI program.


    A webserver is not necessary if you want to run the script on the same
    machine that it resides on. You may "run" anything on the localhost
    with the file://whatever syntax in the browser address bar.

    Of course, it won't display output to the browser... but the program
    WILL run.

    --
    David Filmer (http://DavidFilmer.com)
     
    , Jan 16, 2007
    #6
  7. On Tue, 16 Jan 2007 00:22:16 -0800, usenet wrote:

    > Bob Walton wrote:
    >
    >> Well, one way would be to install a web server on your system. Modify
    >> the Perl script to function as a CGI program.

    >
    > A webserver is not necessary if you want to run the script on the same
    > machine that it resides on. You may "run" anything on the localhost
    > with the file://whatever syntax in the browser address bar.
    >
    > Of course, it won't display output to the browser... but the program
    > WILL run.


    No it won't.

    +------------------------------------------------------------------+
    | You have chosen to open |
    | |
    | test.pl |
    | |
    | which is a: Perl script |
    | from: /home/martijn |
    | |
    | +- What should firefox do with this file? -------------------+ |
    | | +---------------------------------------+ | |
    | | (*) Open with |OpenOffice.org Writer (default) |x| | |
    | | +---------------------------------------+ | |
    | | ( ) Save to Disk | |
    | | | |
    | | [ ] Do this automatically for files like this from now on. | |
    | +------------------------------------------------------------+ |
    | [ X Cancel ] [ V OK ] |
    +------------------------------------------------------------------+

    M4
    --
    Redundancy is a great way to introduce more single points of failure.
     
    Martijn Lievaart, Jan 16, 2007
    #7
  8. kenny

    kenny Guest

    thanks for your help everybody! i used something like you suggested but
    the browser shows me the source code of the .pl
    how can i run it. i thought i would use a typically configured web
    server??






    >
    > http://localhost/x.pl
    >
    > HTH
    >
    > BTW, if you need a free web server, I've got a 51-line Perl one.
    > --
    > Bob Walton
    > Email: http://bwalton.com/cgi-bin/emailbob.pl
     
    kenny, Jan 22, 2007
    #8
  9. kenny

    kenny Guest

    thanks for your help everybody! i used something like you suggested but
    the browser shows me the source code of the .pl
    how can i run it? i thought i would use a typically configured web
    server??






    >
    > http://localhost/x.pl
    >
    > HTH
    >
    > BTW, if you need a free web server, I've got a 51-line Perl one.
    > --
    > Bob Walton
    > Email: http://bwalton.com/cgi-bin/emailbob.pl
     
    kenny, Jan 22, 2007
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,842
  2. JDS
    Replies:
    4
    Views:
    8,353
    ForestHonerkamp
    Nov 11, 2008
  3. diego_83bis

    lAUNCH perl script from java

    diego_83bis, Dec 22, 2008, in forum: Java
    Replies:
    0
    Views:
    525
    diego_83bis
    Dec 22, 2008
  4. Yves PEYSSON

    Launch popup for file load from perl script

    Yves PEYSSON, Feb 18, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    167
    Matt Garrish
    Feb 19, 2004
  5. JDS
    Replies:
    3
    Views:
    216
    gnari
    May 24, 2004
Loading...

Share This Page