in reply to Digest::MD5::md5_hex giving different values on different machines

I ran into this several times and discovered every time that what I was hashing wasn't what I thought I was hashing. In one case, I was using a concatenated hash, which in perl, does not always get stored in the same order. The second time I was concatenating fields returned from a database and figured out that concatenating nulls without a field separator would return unexpected results. The third time, I was inadvertently ref()'ing a variable and therefore the memory address of the glob was part of the input and would change from invocation to invocation.

My point: It's probably not the module, it's your input. Capture the raw inputs and compare them byte-by-byte and you will find your answer.

  • Comment on Re: Digest::MD5::md5_hex giving different values on different machines