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:
- 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.
- 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>" ;
- 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
-
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.
|