Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

How to run perlscript

by lisa2003 (Initiate)
on Jun 27, 2002 at 15:37 UTC ( #177731=perlquestion: print w/replies, xml ) Need Help??

lisa2003 has asked for the wisdom of the Perl Monks concerning the following question:

Hai How to run the pearlscript in the browser.Because I have created some simple pearl print statements but I am not able to the output.Help me

Replies are listed 'Best First'.
Re: How to run perlscript
by little (Curate) on Jun 27, 2002 at 15:47 UTC
    Read the very good docs that ship along with Active Perl :-)
    look for it under:
    Just adjust the path to perl to find the docs, but you should have an entry in :
    Start->Programs->ActiveState AtivePerl 5.6->Dokumentation
    Scroll down the left frame a bit and look for "Windows Specific" and therein for "PerlScript"

    Have a nice day
    All decision is left to your taste


    # sample right out of the above named documentation <HTML> <HEAD> <TITLE>PerlScript Hello World!</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <h2>PerlScript Hello world!</h2> <SCRIPT LANGUAGE="PerlScript"> $window->document->write('Hello world!'); </SCRIPT> </BODY> </HTML>
Re: How to run perlscript
by DamnDirtyApe (Curate) on Jun 27, 2002 at 15:49 UTC

    Perl runs server-side, not client-side. Therefore, you cannot "run" your Perl scripts in a web browser -- they are run on a web server, and the output is viewed with a web browser. If this is indeed what you mean, then:

    1. Make sure your script is executable. In UNIX/Linux, this means the execute bit must be set in the permissions for the user running the web server. Something like 755 is often appropriate. Sorry, not sure what the permissions would look like on Windows.
    2. Make sure the HTML header is being printed. If you're not using CGI (which you should be, eventually), you need a script that looks something like:
      #! /usr/bin/perl print "Content-type: text/html\n\n" ; print "<H1>Hello, World!</H1>" ;
    3. Make sure your web browser is configured to run CGI scripts. You'll have to RTFM on that one. ;-)

    Addendum: lisa2003, posting multiple copies of the same question is frowned upon, and duplicate or near-duplicate posts will be deleted. Please be patient and wait for the advice of your fellow monks.

    D a m n D i r t y A p e
    Home Node | Email
      Sorry, but PerlScript runs alike JavaScript or VBScript on the client, hence the client needs tp have ActiveState's ActivePerl installed.
      Have a nice day
      All decision is left to your taste

        I'm sure the original poster will make use of whichever advice best applies to them. I'm not convinced that `PerlScript' is precisely what they mean, both because english is likely not the poster's first language, and because the two references to `pearl' indicate to me that the poster is obviously very, very green with Perl.

        D a m n D i r t y A p e
        Home Node | Email
Re: How to run perlscript
by mikeirw (Pilgrim) on Jun 27, 2002 at 15:42 UTC
    Can you provide more details? Is the script that you're trying to run located on a server somewhere? Is the script executable? What kind of output are you seeing?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://177731]
Approved by little
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2023-06-06 09:24 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (26 votes). Check out past polls.