Help for this page

Select Code to Download


  1. or download this
    my @topten = sort_top(10, sub { $a <=> $b }, @huge_array);
    
  2. or download this
    sub sort_top {
        my($top, $func, @arr) = @_;
    ...
        }    
        return @top;    
    }