Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Even more puzzled than before

by aitap (Curate)
on Jun 21, 2014 at 05:47 UTC ( [id://1090728]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (9)
As of 2024-04-23 08:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found