Gossamer Forum
Home : General : Perl Programming :

Sorting multidimensional arrays

Quote Reply
Sorting multidimensional arrays
I have a two dimensional array:

(word, frequency)

that I wish to sort in descending order from highest to lowest on the frequency variable. However, I'm at a loss as how to apply the unix 'sort' function to multidimensional arrays. Also, ideally it would be nice to sort frequency ties alphabetically on the word variable.

Any help would be greatly appreciated.

Dan Smile