Perl: the Markov chain saw | |
PerlMonks |
Re^6: Equivalent of unpack 'q' with 32-bit Perl (a8)by Limbic~Region (Chancellor) |
on Sep 06, 2016 at 23:51 UTC ( [id://1171282]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|