in reply to DBD::CSV limitation versus aging/unmaintained modules
If there is a data problem, running through the file with Text::xSV might spot it very quickly since it doesn't try to DWIM around errors and gives fairly detailed error reporting.
As for your code, you do not handle commas, returns or double-quotes properly in a quoted field. Doing it right is surprisingly tricky. I would suggest using a module. Here are some options. Text::CSV is simple to use, but doesn't handle embedded returns properly. Text::CSV_XS is much faster and does handle embedded returns, but it has to be compiled. Text::xSV also handles embedded returns, but is much slower. Unfortunately no two of these have compatible APIs.
|
|---|