in reply to Open file, sort data on matching field, close file
What do you want to sort on? That would indicate how to store the data when you load it.
In any event, use a hash keyed on whatever field you decide, and use the Perl sorted keys idiom when you loop through the structure.
|
|---|