in reply to Best 20 after sort
Yes, like this:
The parenthesis surrounding the sort turn the return value into a list which can be sliced like an array.
foreach my $g( (sort {$Averages{$a} <=> $Averages{$b}} keys %Averages) +[0..19] ){ print $g,"\t",$Averages{$g},"\n"; }
The parenthesis surrounding the sort turn the return value into a list which can be sliced like an array.
In Section
Seekers of Perl Wisdom