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