This is very odd so I must be missing something really obvious. My test program:
use v5.10 ;
use warnings ;
use Text::CSV ;
use FileHandle ;
my $csv = Text::CSV->new((binary => 1)) ;
my $fh = new FileHandle ;
open($fh, "<", $ARGV)
or die "Can't open $ARGV: $!\n" ;
say $fh ;
my $row = $csv->getline($fh) ;
and when I run it, I get:
Can't call method "getline" on an undefined value at D:\Desktop\csvtes
+t.pl line 16.
I printed out $fh and it was clearly not undefined. The file is a vanilla windows-format file and neither my text editor nor excel nor word have a problem with it. ???
My little test file was pretty trivial: