in reply to sorting and array by [2]

Thanks, I'll give these a try. I guess I should have been more clear. I have several files with functions that read in the data and I left some of that code out because it would have made the posting huge. Then I placed a few samples of code I had tried to display what I could not get to work. I found a sample by by tadman that I almost got to work. Tadman's sample is below
Re: How do you specify which fields to sort by when sorting an array. my @output = sort { $a->[0] cmp $b->[0] || $a->[3] <=> $b->[3] } map { chomp; [ split(',', $_, 4) ] } <INPUT_FILE>;