Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: how to sort hash of array by value

by apl (Monsignor)
on Oct 02, 2007 at 10:01 UTC ( [id://642069]=note: print w/replies, xml ) Need Help??


in reply to how to sort hash of array by value

Have a subkey containing the order you wish the colors sorted in (e.g. $colorhash{CCgrey}{rank} = 2;)

Then you could later loop through colorhash testing the {rank} value.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 04:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found