Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Hash sorting (by value) woesby sschneid (Deacon) |
on Feb 24, 2005 at 16:55 UTC ( [id://434134]=perlquestion: print w/replies, xml ) | Need Help?? |
sschneid has asked for the wisdom of the Perl Monks concerning the following question: Hi again, monks! I'm having a heck of a time trying to sort a hash. Here are the details: First off, for reasons uncontrollable by me, I'm being provided a hash containing the contents of /etc/passwd in the following format:
My objective is to sort it based on UID, but the following (my best attempt) doesn't quite seem to work:
I imagine it's probably pretty obvious, but I'm banging my head against the monitor trying to figure it out. Can someone tell me where I'm going wrong?
Thanks, -s.
Back to
Seekers of Perl Wisdom
|
|