in reply to hash key confusion
My recommendation is that you should convert that hexadecimal-value into an ASCII hexadecimal string, and use that as the hash-key.
Otherwise, you run the risk that Perl will, well, “try too hard” to interpret your hex-value as a string ... say, as a Unicode string ... and, maybe, as an ill-formed string. (It’s never a good thing when computers “try too hard” ... heh ... especially when their “perfectly reasonable guesses” are altogether wrong for what you are trying to do.) Therefore, remove all need to ask the computer to guess. Just convert the hexadecimal data into a byte-by-byte representation in nice, 1970’s ASCII, and use that as the key. Suddenly, the entire situation is “unambiguous.” Perfect.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: hash key confusion
by davido (Cardinal) on Mar 24, 2014 at 21:31 UTC | |
by locked_user sundialsvc4 (Abbot) on Mar 25, 2014 at 00:14 UTC |