in reply to A module to parse CSVs line by line with an ability to set delimiter
You tried Text::CSV, which is the wrapper over Text::CSV_pp (pure perl) and the fast Text::CSV_XS. They both have the same syntax:
use Text::CSV; my $parser = Text::CSV->new ({ binary => 1, # allow binary data auto_diag => 1, # allow automatic warnings and errors sep_char => ",", # , is the default, ; is also use quite often }); open my $fh, "<", "file.csv" or die "file.csv: $!"; while (my $row = $csv->getline ($fh)) { say "The second field is ", $row->[1]; }
|
|---|