in reply to Re^5: How would I sort a two-dimensional array by multiple columns?
in thread How would I sort a two-dimensional array by multiple columns?

The only relevant part of the code I posted is "sub NetWallahSort".

Just copy that sub into your code, and use it like:

my @sorted = sort NetWallahSort @$unsorted; # Or, simply "@unsorted", if @unsorted is an Array-of-Arrays, # rather than a reference.
FYI - a 2-Dimensional array is technically an "Array of Array-references".

FonkyMonk makes his declaration ($unsorted) a scalar, which is a "reference to an Array of Array-references", or "a reference to a 2-d Array". As Sienfeld would say - not that there is anything wrong with that!

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom

  • Comment on Re^6: How would I sort a two-dimensional array by multiple columns?
  • Download Code