in reply to Re^2: Appending data to large files
in thread Appending data to large files
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: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Appending data to large files
by joec_ (Scribe) on Jan 14, 2009 at 09:37 UTC | |
by kyle (Abbot) on Jan 14, 2009 at 13:33 UTC |