Having written the script on a windows box, if you uploaded it to a unix or linux server, there is probably a problem on the shebang line, if the dos-specific CRLF line termination was not converted to unix LF. If the first line of your script (as it exists on the server) contains:
#!/usr/bin/perl\r\n
it won't run on the server. Get rid of the CR (use text-mode file transfer to the server, or dos2unix on the server after the script is uploaded.) Another work-around is to add a useful flag or two:
#!/usr/bin/perl -T -w
When you do that, you not only get the benefits of taint checking and warnings enabled (which you ought to do anyway for a cgi script!!), but also unix will correctly parse out the path to perl as
/usr/bin/perl (rather than
/usr/bin/perl\r).
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.