If you have to deal with "real" CSV files where fields can have commas in them (and that are hence enclosed in duoble quotes) the suggestions of my fellow monks won't work without taking this into account.
If this is the case, you may want to have a look at some modules at CPAN: Text::CSV or Text::CSV_XS (preferably the latter).
If you're familiar with SQL, the DBD::CSV module may be of interest, this allows to query a CSV data file using a subset of SQL (without any database).
Hope this helps, -gjb-
In reply to Re: file comparison
by gjb
in thread file comparison
by gasky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |