Many things could be wrong. The most likely possibility is that there is an environment difference between when you run things in the shell and in the webserver. The following script can give you the environment:
#! /usr/bin/perl
use Data::Dumper;
print "text/plain\n\n";
print Dumper(\%ENV);
Use that to figure out what your shell's environment and your script's environment are. Start adjusting things one at a time in your shell, trying the script, and see when it breaks, telling you what you need to take care of.
If that isn't it, then I'd look for a chroot, the webserver executing from a different directory that you expect or a problem because the webserver is a different user than you are.
If those aren't it, then you're getting into more esoteric territory. Odds are that you won't have to go into esoteric territory.
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.