Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Bug in perl -C (Unicode) option parsing?

by ikegami (Patriarch)
on Feb 13, 2007 at 04:43 UTC ( [id://599640]=note: print w/replies, xml ) Need Help??

in reply to Bug in perl -C (Unicode) option parsing?

It's not system-specific. I can replicate your results in Windows.

>perl -l -CDS -e "print qq{\x{101}}" [funky chars] >perl -CDS [funky chars] >perl Wide character in print at line 2. [funky chars]
This is perl, v5.8.8 built for MSWin32-x86-multi-thread Binary build 817 [257965] provided by ActiveState Built Mar 20 2006 17:54:25

The fourth test has a different result, because it's the same as the third test in Windows.

> Wide character in print at line 2. [funky chars]

Could it be related to the script starting execution before the -CDS switch is encountered? In other words, maybe STDIN, STDOUT, STDERR have already been created by the time shebang -CDS is encountered.

Replies are listed 'Best First'.
Re: Bug in perl -C (Unicode) option parsing?
by benizi (Hermit) on Feb 14, 2007 at 18:41 UTC

    It seems ikegami (and my unstated suspicion) were correct. Bleadperl now dies:

    perl-5.9.4-build$ ./perl Too late for "-CDS" option at line 1.

    I thought the error looked familiar, so I tried it with "-T", but I see that one is now updated to:

    perl-5.9.4-build$ ./perl "-T" is on the #! line, it must also be used on the command line at te line 1.

    (With perl5.6.0 and perl5.005_03, I get the familiar:)

    old-solaris-machine$ perl5.6.0 Too late for "-T" option at line 1.

    So, it seems it was a bug, but it's been fixed in the 5.9 line.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://599640]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-05-28 22:20 GMT
Find Nodes?
    Voting Booth?

    No recent polls found