Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to sort an array of hashes based on one of the values in the hash?

by tangent (Priest)
on Mar 08, 2013 at 15:29 UTC ( #1022448=note: print w/ replies, xml ) Need Help??


in reply to How to sort an array of hashes based on one of the values in the hash?

With real world data I would use:
@AoH = sort { lc($a->{'Son'}) cmp lc($b->{'Son'}) } @AoH;
  • Comment on Re: How to sort an array of hashes based on one of the values in the hash?
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2016-08-26 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (366 votes). Check out past polls.