On Tue, Sep 6, 2016 at 3:24 PM Shawn H Corey <shawnhco...@nili.ca> wrote:
> > #Change the value to the maximum you want > > my %HEXCODES = map{$_ => sprintf("%03X", $_)} (0..128); > > my %HexCodes = map { ord($_) => sprintf '%02X', $_ } ( 0 .. 128 ); > Just your friendly reminder that Unicode exists and unless you are opening the file with the ":raw" IO layer, you can easily get unprintable characters above 0x7F: perl -e 'for (0 .. 0x10ffff) { printf("U+%04x is not printable\n", $_) unless chr =~ /[[:print:]]/ }' Even limiting ourselves to values that fit in one byte, the first 32 values above 127 (U+0080 - U+009F) are all control characters (the C1 set).