in reply to Re^2: Translating non-printable ascii
in thread Translating non-printable ascii
The compound map builds the translation table.$_="MO\x81B\x8dCAJ\xa3"; my $start = 0x80; my %xlate = map { my $first = $_; map {(chr($start++), "$first$_")} (0..9, '.') } (0..9,'.') ; s/([\x80-\xec])/$xlate{$1}/g; print;
|
|---|