in reply to Re^4: Bad Text::CSV_XS parameter
in thread Bad Text::CSV_XS parameter

You can use header () even if your CSV does not have a header, if only to detect BOM, eol, and SEP.

open my $fh, "<", "file.csv" or die "$!"; my $csv = Text::CSV_XS->new ({ binary => 1, auto_diag => 1 }); $csv->header ($fh, { bom => 1, set_column_names => 0 }); while (my $row = $csv->getline ($fh)) { # ... }

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.