title: While passing arguments to a Perl script, it's not opening the file
body: <p><strong>This is script is used to compare two .csv files and write difference in results.xls</strong></p>
  
  <p>my perl script(name:cmp.pl) is:</p>
  
  <pre><code>#!C:\Perl\bin
  
  use Spreadsheet::WriteExcel;
  use Spreadsheet::WriteExcel::Utility;
  
  my $Wb = Spreadsheet::WriteExcel-&gt;new('results.xls');
  my $s1 = $Wb-&gt;add_worksheet('res');
  
  open(FILE1, "&lt; ARGV[0]") || die "Cannot open $ARGV[0]\n";
  open(FILE2, "&lt; ARGV[1]") || die "Cannot open $ARGV[1]\n";
  
  @file1 = &lt; FILE1&gt;;
  @file2 = &lt; FILE2&gt;;
  
  my $format  = $Wb-&gt;add_format();
  my $format1 = $Wb-&gt;add_format();
  
  $format-&gt;set_bg_color('red');
  $format1-&gt;set_bg_color('yellow');
  
  for $i (0 .. $#file1) {
  
    $line1 = $file1[$i];
    $line2 = $file2[$i];
  
    if (!($line1 eq $line2)) {
  
      @x = split(/\,/, $line1);
      @y = split(/\,/, $line2);
  
      for $j (0 .. $#x) {
        if ((($x[$j] != $y[$j]) || (!($x[$j] eq $y[$j])))) {
          $s1-&gt;write($i, $j, $y[$j], $format);
        }
        else {
          $s1-&gt;write($i, $j, $y[$j], $format1);
        }
      }
    }
    else {
      @x = split(/\,/, $line1);
      $s1-&gt;write_row($i, 0, \@x);
    }
  }
  
  $Wb-&gt;close();
  
  close(FILE1);
  close(FILE2);
  </code></pre>
  
  <hr>
  
  <p>I passed the arguments(files) in cmd promt like</p>
  
  <p><code>\perl&gt;cmp.pl t1.csv t2.csv</code>:</p>
  
  <p>output:its showing cannot open</p>