Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: "warn" is your best friend

by moritz (Cardinal)
on Mar 23, 2014 at 08:02 UTC ( #1079431=note: print w/ replies, xml ) Need Help??

in reply to "warn" is your best friend

Since you mentioned Unicode: Many Perl programs these days set up STDOUT correctly to encode the output, but forget to the same with STDERR (and yes, I myself am guilty of this many times over).

So when debug-outputting non-ASCII strings to STDERR, you need to be extra aware of encoding issues.

(That said, when debugging encoding issues, I usually set $Data::Dumper::Useqq = 1 and debug with Data::Dumper, so it's not that much of an issue; but if you want to warn plain strings, you must be aware of it).

Comment on Re: "warn" is your best friend
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-11-25 10:36 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (673 votes), past polls