in reply to Digest::MD5 Bug?

RTFM ;-) it's clearly written in the perldoc

Note that the "digest" operation is effectively a destructive, read-once operation. Once it has been performed, the "Digest::MD5" object is automatically "reset" and can be used to calculate another digest value.
so no surprise there as you are calling the method twice.

Update:Sorry for the duplicaton there, I was too slow ;-)

-- Hofmator