in reply to hex to ascii, oct to ascii, and back?

Maybe you'll find sprintf more interesting for converting than printf...
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"