Is -C useless?
paul at pjcj.net
Thu Sep 11 14:19:17 BST 2008
On Thu, Sep 11, 2008 at 01:52:31PM +0100, Paul LeoNerd Evans wrote:
> On Thu, 11 Sep 2008 13:24:34 +0100
> Paul Orrock <paulo at digitalcraftsmen.net> wrote:
> > $ chmod 755 test.pl
> > $ ./test.pl
> > Which gives me the output you want : Hello wérld
> > Unless I've missed something, which is highly likely
> $ ll test.pl
> -rwxr-xr-x 1 leo leo 48 2008-09-11 13:51 test.pl
> $ cat test.pl
> #!/usr/bin/perl -COL
> print "Hello w\xe9rld\n";
> $ ./test.pl
> Too late for "-COL" option at ./test.pl line 1.
> By the way, this is perl 5.10. I think it used to work on 5.8.8.
Ah, then you'll have read pod/perl5100delta.pod.
The B<-C> option can no longer be used on the C<#!> line. It wasn't
working there anyway, since the standard streams are already set up
at this point in the execution of the perl interpreter. You can use
binmode() instead to get the desired behaviour.
Which is just what you seem to have discovered ;-)
Paul Johnson - paul at pjcj.net
More information about the london.pm