http://qs321.pair.com?node_id=676383


in reply to Re: Sorting an array of hashes
in thread Sorting an array of hashes

It took me a bit to understand the error/solution myself here. $a and $b are set to elements of @AoH, not indexes of @AoH, so there is no need to look up the element as in %{$AoH[$b]}, you just directly dereference the hash reference directly as %{$b}, correct?

I agree on the use warnings; as that 'Use of reference "HASH(########)" as array index at myscript.pl' saves me from my own novice-ness constantly.