Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Sorting an array of hashes

by amarquis (Curate)
on Mar 26, 2008 at 12:39 UTC ( [id://676383]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://676383]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-29 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found