Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-11-21 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (105 votes), past polls