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 }
In reply to Re: Selection of Hash key value pairs
by lima1
in thread Selection of Hash key value pairs
by Gavin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |