Hey! I'm receiving a string from a database that is a 20-character binary string. I would like to convert it into printable characters, so I was using unpack ("H*", $binstr). However, sometimes this gives me results of 40 characters (which is what I would expect) and sometimes it gives results of 42, which have to extra bytes that differ from my expected return value.
Example, my most recent trial included my expected value being 2758deeab3b550701a0a710c2e46dda2dec37521 and my returned value being 5c2758deeab3b550701a0a710c2e46dda2dec37521. The two extra bytes do not always occur, and they're not always at the beginning.
Am I doing something wrong?
Thanks,
Jared