[Vienna-pm] perl 5.10.0 -C

Peter J. Holzer hjp-vienna-pm-list at hjp.at
Wed Jul 16 03:46:05 PDT 2008


Gegeben sei folgendes einfaches Script:

#!/usr/bin/perl -CO
print "\x{20AC}\n";

Das funktioniert auf perl 5.8.x wie gewünscht (gibt ein UTF-8-kodiertes
€-Zeichen aus). Mit Perl 5.10.0 bekommt man die Fehlermeldung:

Too late for "-CO" option at ./foo line 1.


perl -CO -e 'print "\x{20AC}\n"'
funktioniert aber. 

Was ist der Unterschied und was wäre früher als die Shebang-Zeile?

Ich kann natürlich -CO durch binmode(STDOUT, ':encoding(UTF-8)')
ersetzen, was ohnehin sauberer wäre, aber irgendwie interessiert mich
schon, was da los ist.

	hp

-- 
   _  | Peter J. Holzer    | Openmoko has already embedded
|_|_) | Sysadmin WSR       | voting system.
| |   | hjp at hjp.at         | Named "If you want it -- write it"
__/   | http://www.hjp.at/ |  -- Ilja O. on community at lists.openmoko.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.pm.org/pipermail/vienna-pm/attachments/20080716/949abaec/attachment.bin>


More information about the Vienna-pm mailing list