The problem was that your edited is adding a BOM before the shebang line, so your web server didn't accurately detect the shebang line. "#!" must appear at the very top of the file and it wasn't. The following will remove the UTF-8 BOM from a file:
perl -i.bak -ple"s/^\xEF\xBB\xBF// if $.==1" script.cgi
Note that if your source is UTF-8, you should probably use use utf8;.
In reply to Re^9: Weird error log message
by ikegami
in thread Weird error log message
by Nik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |