in reply to how to use fgets to Break file into individual records

I'm not sure I understand. In a CSV file a row is a record. Do you mean individual fields of the record? There's split, or m// with captures, or you could write a full parser with something like Parse::YAPP or Parse::RecDescent.

There are a number of tools that do this correctly already, and very few first-time attempts get it right. Take a look at these:

* These require DBI and to treat the data as if it was a database.**
** That's handy if you're already using DBI for something else in the application or intend to replace the CSV files with a database later.

  • Comment on Re: how to use fgets to Break file into individual records