Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Sorting an array of hash references of array references

by nikmit (Sexton)
on Aug 17, 2016 at 09:52 UTC ( [id://1169896]=note: print w/replies, xml ) Need Help??


in reply to Sorting an array of hash references of array references

OK, found http://www.perlmonks.org/?node_id=599204 and came up with this:

my @sorted = sort { $a->{entry}->[1] cmp $b->{entry}->[1] } @array;

Seems to do the trick.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-25 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found