Help for this page

Select Code to Download


  1. or download this
    my @k = sort keys %the_hash;
    
    ...
    for ( 0.. int( @k * ($pct/100) ) )-1 ) {
       printf "%s => %s\n", $k[$_], $the_hash{$k[$_]}
    }
    
  2. or download this
    my @k = sort keys %the_hash;
    
    ...
       delete $the_hash{$k[$_]} 
    }
    # Now %the_hash only contains the top 10%