in reply to Sort array using a ranking system from separate hash
What did you try? Isn't it straight forward after reading sort (sic) ?
like modifying this snippet from the perldoc accordingly?
# this sorts the %age hash by value instead of key # using an in-line function my @eldest = sort { $age{$b} <=> $age{$a} } keys %age;
Or am I missing something?
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
PS: Sorry for not providing ready to use code, I prefer to teach fishing instead of giving away fishes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sort array using a ranking system from separate hash
by Sandy_Bio_Perl (Beadle) on Aug 08, 2016 at 10:08 UTC | |
by haukex (Archbishop) on Aug 08, 2016 at 10:41 UTC | |
by Sandy_Bio_Perl (Beadle) on Aug 08, 2016 at 10:48 UTC | |
by LanX (Saint) on Aug 08, 2016 at 10:36 UTC |