seaver has asked for the wisdom of the Perl Monks concerning the following question:
If I just wanted the best 20, is it possible to do this in the same line as the sort?foreach my $g(sort {$Averages{$a} <=> $Averages{$b}} keys %Averages){ print $g,"\t",$Averages{$g},"\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best 20 after sort
by Taulmarill (Deacon) on Oct 20, 2008 at 14:24 UTC | |
|
Re: Best 20 after sort
by Limbic~Region (Chancellor) on Oct 20, 2008 at 14:23 UTC | |
by seaver (Pilgrim) on Oct 20, 2008 at 16:03 UTC | |
|
Re: Best 20 after sort
by salva (Canon) on Oct 21, 2008 at 07:51 UTC | |
|
Re: Best 20 after sort
by GrandFather (Saint) on Oct 20, 2008 at 20:08 UTC | |
|
Re: Best 20 after sort
by johngg (Canon) on Oct 20, 2008 at 18:15 UTC |