Untested, btw. I'm not sure what you mean with shortest and longest numerical key. I'll assume here you mean minimum and maximum. If you mean shortest string-wise, use minstr and maxstr instead.use List::Util qw(min max sum); my $min = min keys %hash; my $max = max keys %hash; my $avg = sum(keys %hash) / keys %hash; # Won't work: avg keys %hash;
In reply to Re: Hash Profile
by ar0n
in thread Hash Profile
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |