in reply to Line-by-line processing of a file where the first line is different
If you are comfortable with SQL you may find DBD::CSV does a useful job for you.