in reply to Sorting a hash by values...
You're extremely close. Now all you have to do is loop over @simpson_age, and use the value from that array as the key to your age hash. (Similar, but not exactly like, you're using $a and $b in your sort subroutine.)
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sorting a hash by values...
by chinamox (Scribe) on Oct 10, 2006 at 09:14 UTC |