in reply to Array of hash sorting problem

I hope you are aware that hashes are not sorted, so as Perl data structures the following two are exactly equivalent:

{ 3 => 15, 4 => 8, 5 => 9, } # and { 4 => 8, 5 => 9, 3 => 15, }

So you can either sort and print, or sort and store in a different data structure - sorting and trying to store it in a another array of hashes doesn't make sense.

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: Array of hash sorting problem
by 7stud (Deacon) on Mar 25, 2010 at 17:17 UTC

    Finally, a voice of reason.

    To the rest of you, keep trying to sort those hashes.

      You should really read the FAQ, because yes, you can sort hashes "7stud"