in reply to Converting decimal value to hex
>perl -e"use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper qq{\ +x{400}};" $VAR1 = "\x{400}";
If you were dealing with bytes, you could use unpack 'H*'
>perl -le"$h = uc unpack 'H*', qq{123\t\n}; $h = ~ s/(..)/$1 /g; print + $h" 31 32 33 09 0A
|
|---|