wassmp1 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to parse a CSV file using TEXT::CSV_XS. The following code runs fine on Windows:
use strict; use warnings; use Text::CSV_XS; my $csv = Text::CSV_XS->new ({auto_diag => 1, binary => 1 }); my $infile_name = "DeviceTrim.csv"; open my $CSV_INPUT, "<", $infile_name or die "$infile_name: $!"; my $row = $csv->getline ($CSV_INPUT);
But when I run it on Linux I get the message:
Can't call method "getline" on an undefined value at DeviceTrimGen.pl +line 7.
Any ideas?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CSV_XS issue
by Anonymous Monk on Sep 04, 2013 at 19:20 UTC | |
by wassmp1 (Initiate) on Sep 04, 2013 at 19:49 UTC | |
by Tux (Canon) on Sep 05, 2013 at 06:34 UTC | |
by sundialsvc4 (Abbot) on Sep 05, 2013 at 01:50 UTC | |
by wassmp1 (Initiate) on Sep 04, 2013 at 19:24 UTC |
Back to
Seekers of Perl Wisdom