my $char = 'm'; my $octal = sprintf("%03o", ord($char)); my $hex = sprintf("%02X", ord($char)); print "Oktal: $octal\tHex: $hex\n";
Best regards,
perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"
In reply to Re: hex to ascii, oct to ascii, and back?
by strat
in thread hex to ascii, oct to ascii, and back?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |