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: $!";

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^3: CSV headers. Feedback wanted
by Laurent_R (Canon) on Feb 14, 2016 at 09:53 UTC
    Really? Strange, I can swear that I tried it for at least a full day and it failed miserably each time the file was really large. I guess I must have used it wrongly then, possibly I used an example that was not adequate for my needs, but it's too long ago for me to remember the exact details.

    Well, thank you and thans to AnonyMonk for the information, I'll look at it again. And... sorry for the disruption with apparently inaccurate information.