The stupid question is the question not asked | |
PerlMonks |
Re^2: Sorting an array of hashesby amarquis (Curate) |
on Mar 26, 2008 at 12:39 UTC ( [id://676383]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|