in reply to Re^10: Weird error log message
in thread Weird error log message
Isnt it enough that it has it in the shebang line as well '#!/usr/bin/perl' ?
What's "it"?, the "#!"? No. When I said it has to be the very first thing in the file, I meant it has to be the very first thing in the file.
$ od -c a.pl 0000000 357 273 277 # ! / u s r / b i n / p +e 0000020 r l \n p r i n t ( " H e l l o 0000040 W o r l d \ n " ) ; \n \n 0000054 $ a.pl -bash: ./a.pl: cannot execute binary file $ perl -i.bak -ple"s/^\xEF\xBB\xBF// if $.==1" a.pl $ od -c a.pl 0000000 # ! / u s r / b i n / p e r l \ +n 0000020 p r i n t ( " H e l l o W o +r 0000040 l d \ n " ) ; \n \n 0000051 $ perl a.pl Hello World
i tried clciking the link with BOM but it wont load
It's the Wikipedia page on "byte-order mark". I don't see why you couldn't load it.
When a script source is considered to be utf-8?
Either it is or it isn't. There's no "considered" about it. If you saved it using UTF-8 as the encoding, it's UTF-8. If you used another encoding, it isnt.
But yes, I meant when the source is UTF-8.
Perl will assume the source is encoded using iso-8859-1 unless use utf8; is used.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: Weird error log message
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 |