http://www.perlmonks.org?node_id=1171282


in reply to Re^5: Equivalent of unpack 'q' with 32-bit Perl (a8)
in thread Equivalent of unpack 'q' with 32-bit Perl

Anonymous Monk,
just use md5_hex to get hex version of digest

That's a brilliant (obvious) idea. I wish I had thought of it before I wrote the code above (which now handles negative numbers as well). I assume your approach will work but I am not inclined to verify (the guy I am helping should be able to do it himself). Thanks!

Edit: After thinking about it for a minute, I don't think that would work. Basically, you have an 128 bit integer in binary form and you are then converting the first 64 bits of it into decimal form. I'm pretty sure a hex digest isn't going to help here because you can't simply just cut it in half.

Cheers - L~R