in reply to Selection of Hash key value pairs
my $i = 0; my $cutoff = ( keys %h ) / 10; KEY: foreach my $key ( sort { $b <=> $a } keys %h ) { $i++; last KEY if $i > $cutoff; # print to file } [download]