Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Chinese to Hex and Hex to Chinese

by Anonymous Monk
on Sep 05, 2017 at 14:21 UTC ( [id://1198694]=note: print w/replies, xml ) Need Help??


in reply to Chinese to Hex and Hex to Chinese

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.

Replies are listed 'Best First'.
Re^2: Chinese to Hex and Hex to Chinese
by thanos1983 (Parson) on Sep 05, 2017 at 16:21 UTC

    Hello Anonymous Monk,

    Thanks for the time and effort, reviewing my script. You are absolutely right. I checked the source of the script and it is actually that simple.

    Well it is easier for me to use the lexical methods instead of creating my own subroutines and call them inside the script. But you gave me a nice idea on how to proceed.

    Thanks again for your time and effort, BR.

    Seeking for Perl wisdom...on the process of learning...not there...yet!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1198694]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-04-23 19:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found