in reply to Re: CSV headers. Feedback wanted
in thread CSV headers. Feedback wanted
The default low-level mode is iterative!
The new csv function by default is pulling all data into memory, but by using a filter you can prevent that. The documentation shows examples.
Iterative (straight from the docs):
use Text::CSV_XS; my $csv = Text::CSV_XS->new ({ binary => 1, auto_diag => 1 }); open my $fh, "<", "file.csv" or die "file.csv: $!"; while (my $row = $csv->getline ($fh)) { # do something with @$row } close $fh or die "file.csv: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: CSV headers. Feedback wanted
by Laurent_R (Canon) on Feb 14, 2016 at 09:53 UTC |