Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Chinese to Hex and Hex to Chineseby Anonymous Monk |
on Sep 05, 2017 at 14:21 UTC ( [id://1198694]=note: print w/replies, xml ) | Need Help?? |
Very nice. BTW, ascii_to_hex($str) is just unpack('H*', $str) and hex_to_ascii($str) is just pack('H*', $str). Those functions are incorrectly named because, as you've discovered, the input doesn't have to be ascii. pack is kind of tricky, but it would help you if you studied its ways.
In Section
Meditations
|
|