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


in reply to Digest::SHA gives different values for unix/windows

$sha1->addfile($data, "p");

I'm not sure that you'd want to use "p" with binary files. (I haven't checked, but I'm thinking it might be applicable only for text files.)
Try specifying "b" - and if that fixes things then you've found the problem.
Otherwise, it's probably as Jim said.

Cheers,
Rob