OK, this is a shot in the dark and has nothing to do with perl but your post doesn't give much information about the problem you are having (except that it appears to be a textbook example of a first cgi script). My
guess is that your script simply isn't running
"I can't seem to get the Perl script to run off the server". A simple problem like this has bitten me more than once. Be sure to make the perl script executable. A
chmod 755 pathandfilename from the command line should suffice (if this is the problem.)
Other than that, I always run a
tail -f error_log in one session and a
tail -f access_log in another so that I see exactly what is going on while I debug. You should also try changing the first line in your script to
#!/usr/local/bin/perl -w
The next line is a must have
use strict;
And while some may feel this is overkill, it will help you solve a lot of problems a lot quicker.
use warnings;
use diagnostics;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.