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

Re: RFC: Basic debugging checklist

by JavaFan (Canon)
on Feb 19, 2009 at 00:06 UTC ( #744914=note: print w/ replies, xml ) Need Help??


in reply to RFC: Basic debugging checklist

Check for unprintable characters and identify them by their ASCII codes using ord
print ":$_:", ord($_), "\n" for (split //, $str)
That, IMO, makes it hard to spot unexpected unprintable characters because you turn ALL characters into numbers. I often do:
my $copy = $str; $str =~ s/([^\x20-\x7E])/sprintf '\x{%02x}', ord $1/eg; print $str, "\n";
which leaves all printable ASCII characters as is, and turns all other characters into hex escapes.


Comment on Re: RFC: Basic debugging checklist
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2014-07-26 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls