http://qs321.pair.com?node_id=632706


in reply to Re^2: md5_hex changes its argument
in thread md5_hex changes its argument

In the meantime you could use my $md5 = md5_hex("$string"); to work around the problem.