in reply to How can I sort this data on the first field

Take a look at the Sort::Fields package

Sort::Fields provides a general purpose technique for efficiently sorting lists of lines that contain data separated into fields.
  • Comment on Re: How can I sort this data on the first field