Originally Posted by dexznrl
I have a small problem with Perl and Apache. If I use "#!/usr/bin/perl" in the beginning of a perl script the script won't work if the script is at all complicated. Simple scripts like "Hello World" works.
But if I use "#!/usr/bin/perl -w" in the beginning all scripts work? If I don't use the -w this is whats in the logs:
(2)No such file or directory: exec of '/home/test.net/html/cgi-bin/uh/meny.pl' failed
Premature end of script headers: meny.pl
When I use the -w in the script the error-log shows me this.
meny.pl: Name "main::http_path_cgi" used only once: possible typo at /home/test.net/html/cgi-bin/uh/meny.pl line 24.
I have no perl knowledge.
If you're just starting to learn Perl, you should read up on it. The "-w" option says "use warnings". If your 'complicated' script gets a warning (and you're running WITHOUT the -w), it'll die. If you ARE running with it, you (surprise!), get a warning message about line 24.
So...either run with -w, or fix your code.