http://qs321.pair.com?node_id=11107247


in reply to Help Sorting a CSV File

What came to my mind was to use Data::Table. It will import from a CSV, can handle a header row, and it can sort by one or more columns. If I understood your post correctly, then it looks like this module will do everything that you're wanting to do.