$data{1} = {'a' => 10, 'b' => 5, 'c' => 20 }; $data{2} = {'a' => 90, 'b' => 15, 'c' => 40 }; @Top = sort { $a <=> $b } map { # cut values %{$data{$_}} } keys %data; @Top[0..2]; # or simplify to ( sort { $a <=> $b } map { # cut values %{$data{$_}} } keys %data; )[0..2];
--
Marco Antonio
Rio-PM
In reply to Re: Sorting HOH
by mda2
in thread Sorting HOH
by swaroop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |