6
sub unidump { join(' ', map { sprintf '%04X', $_ } unpack 'U*', shift) }
12
s/\b00([46][1-9A-F]|[57][0-9A])\b/'{'.chr(hex $1).'}'/ge;
25
if (/^[\x20-\x7E]\z/) {
26
$ret .= "\\" if !/^[0-9A-Za-z_]\z/;
28
} elsif (/^[\x80-\xFF]\z/) {
29
my $temp = @c == 1 ? "'U'" : "'U*'";
30
my $hexa = join ', ', map sprintf("0x%X", $_), unpack('U*', $s);
31
return "pack($temp, $hexa)";
33
$ret .= sprintf '\x{%X}', unpack 'U', $_;