Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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

In reply to Re: How to run perlscript by DamnDirtyApe
in thread How to run perlscript by lisa2003

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-03-28 12:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found