my @keys_to_print = (reverse sort keys %hash)[0 .. int(0.20 * (keys %h +ash))-1]; foreach my $key (@keys_to_print) { print_to_file($key, $hash{$key}); } sub print_to_file { # print to file }
In reply to Re^2: Selection of Hash key value pairs
by arkturuz
in thread Selection of Hash key value pairs
by Gavin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |