title: Why are MD5 hashes for the same data different on Linux and Windows?
body: <p>Here's the workflow.</p>
  
  <ol>
  <li>Client uploads an XML file and a checksum MD5 file to our FTP.</li>
  <li>The Perl server copies the file from the FTP server.</li>
  <li>The Perl server runs its own MD5 check on the XML file and then compares it to the value in the MD5 file.</li>
  </ol>
  
  <p>The two MD5 hashes never match.  But, when I copy the XML file to my windows machine and run the same Perl script running in Windows, I get the same answer as their MD5 file.  </p>
  
  <p>Can anyone tell me what’s going on?</p>
  
  <p>Here’s the script I am using to compute the MD5 hash.</p>
  
  <pre><code>use warnings;
  use strict;
  use Digest::MD5;
  my $fname = "MarketPricePoint_2013_07_16_1500.xml";
  open (my $fh, '&lt;', $fname) or die "Can't open '$fname': $!";
  binmode ($fh);
  my $hash = Digest::MD5-&gt;new-&gt;addfile($fh)-&gt;hexdigest;
  print $hash;
  </code></pre>