There's more than one way to do things | |
PerlMonks |
Re: how to sort hash of array by valueby apl (Monsignor) |
on Oct 02, 2007 at 10:01 UTC ( [id://642069]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|