in reply to Re^8: Weird error log message
in thread Weird error log message
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;.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^10: Weird error log message
by Nik (Initiate) on Jun 16, 2009 at 07:47 UTC | |
by ikegami (Patriarch) on Jun 16, 2009 at 13:35 UTC | |
by Nik (Initiate) on Jun 16, 2009 at 18:44 UTC | |
by ikegami (Patriarch) on Jun 16, 2009 at 18:48 UTC | |
| |
by ikegami (Patriarch) on Jun 16, 2009 at 18:57 UTC | |
by Nik (Initiate) on Jun 16, 2009 at 19:37 UTC | |
by Anonymous Monk on Jun 16, 2009 at 07:52 UTC |
In Section
Seekers of Perl Wisdom