Is -C useless?

Paul LeoNerd Evans leonerd at
Fri Sep 12 00:28:22 BST 2008

On Thu, 11 Sep 2008 15:19:17 +0200
Paul Johnson <paul at> wrote:

> 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.

Waaait a moment.

Why can't -C just call binmode itself?

This is getting stupider by the moment.

I've even tried this; it JustWorks:

 BEGIN { exec $^X, "-COL", "-f", $0, @ARGV unless ${^UNICODE} }

 print "Hello w\xe9rld\n";

 $ ./ 
 Hello wérld

Paul "LeoNerd" Evans

leonerd at
ICQ# 4135350       |  Registered Linux# 179460
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the mailing list