in reply to Even more puzzled than before

By the way, if you omit both use utf8 and -C... switch, Perl will treat your strings like binary data. This will both avert the warnings and make sure that strings come out exactly as you typed them in the source code. Of course, text operations (like substr and pattern matching) will be broken in this case, but if all you want is to print UTF-8 unchanged, this is much easier than making Perl encode and decode them needlessly.

Your first example works for me, and if I remove use utf8 from it and run it without -C..., it still does.

For portable text processing scripts check out Encode::Locale.

Replies are listed 'Best First'.
Re^2: Even more puzzled than before
by Anonymous Monk on Jun 21, 2014 at 08:50 UTC
    binary data with newline translation ... yeah :D