The getline method is expecting an object with a getline method. Basically you have to open the file and pass in the handle instead of the filename.
my $csv_filename = 'project_data.csv'; open my $csv_fh, '<', $csv_filename or die "Can't read '$csv_filename': $!"; my $parser = Text::CSV->new(); while ( my $row = $parser->getline( $csv_fh ) ) { # work, work, work } close $csv_fh or die "close() failed: $!";
In reply to Re^3: Appending data to large files
by kyle
in thread Appending data to large files
by joec_
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |