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


in reply to Re^3: Export CSV v2
in thread Export CSV v2

Ok I have the script as follows:

my $csv = Text::CSV->new( { binary => 1, auto_diag => 2, } ) or die "Cannot use CSV: " . Text::CSV->error_diag(); $csv->eol ("\x0d\x0a"); for my $csvFile (@ARGV) { print "\nProcesing file $csvFile ...\n"; open my $csvfh, '<', $csvFile or die "Unable to open $csvFile: $!" +;

When I run the script, i still get the following error:

Can't use an undefined value as an ARRAY reference at test.pl line 23, <$csvfh> line 1.

This happens whether the CSV is in MS Excel format, or TXT