P is for Practical | |
PerlMonks |
Re^2: Sorting hashes with new value detectionby sulfericacid (Deacon) |
on Jan 24, 2006 at 17:57 UTC ( [id://525268]=note: print w/replies, xml ) | Need Help?? |
In short, I am creating a little word game. Each character is worth X points, so I record the word in the hash along with the value of the entire word. That's what the numbers are in the example (not accurate, mind you, it's just basic sample code). When I print out scores, I'll need to be able to sort by the length of the word and/or sort by the word values. When sorted by value, I need to be able to display all words in specific categories by their value. All 5 pt words are grouped together, as so on. Thank you. "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us" sulfericacid
In Section
Seekers of Perl Wisdom
|
|