in reply to CSV Parser, with and without encapsulation
The "best" is of course Text::CSV_XS :)
Text::CSV is just a wrapper over Text::CSV_XS and/or Text::CSV_PP.
If your CSV data is mixed and invalid, chances are that you might not find a combination of options that will work on all records, but a good start for what you describe would be something like:
my $csv = Text::CSV_XS->new ({ binary => 1, allow_loose_quotes => 1, escape_char => undef, auto_diag => 1, });
Please carefully read the manual for all allow_*** options.
|
|---|