in reply to Strange interaction between command line and encoding

Update: OK, I think I am way off base... The original usage has a "fat-comma" on the right side of STDOUT which makes it a string anyway... I can't even claim no coffee since I don't drink it! Ah well...

OK, I may be way off base, but using B::Deparse to see how perl treats the -M command line switch shows it's processed as:
use encoding (split(/,/, 'utf16,STDOUT,utf8', 0));
That seems to indicate that the problem is that STDOUT is just a string rather than the actual filehandle when it's passed into encoding::import via the -M command line parameter.

HTH


-- Brian

Replies are listed 'Best First'.
Re^2: Strange interaction between command line and encoding
by VSarkiss (Monsignor) on Jun 02, 2006 at 20:48 UTC
Re^2: Strange interaction between command line and encoding
by ikegami (Patriarch) on Jun 02, 2006 at 20:34 UTC
    But STDOUT => "utf8" return strings too! It's equivalent to 'STDOUT', "utf8".