title: Opening a CSV file created in Mac Excel with Perl
body: <p>I'm having a bit of trouble with the Perl code below. I can open and read in a CSV file that I've made manually, but if I try to open any Mac Excel spreadsheet that I save as a CSV file, the code below reads it all as a single line. </p>
  
  <pre><code>#!/usr/bin/perl
  
  use strict;
  use warnings;
  
  open F, "file.csv";
  
  foreach (&lt;F&gt;)
  {
      ($first, $second, undef, undef) = split (',', $_);
  }
  
  print "$first : $second\n";
  
  close(F);
  </code></pre>