Of course, if you are sure that all values are positive numeric values, there is no problem. But it is something to keep in mind in general, I think.my %hashName = (a => -1, b => -2, c => -3); my $max = 0; $_ > $max and $max = $_ for values %hashName; print $max; __END__ 0 # expected -1
Liz
In reply to Re: Re: max value in a hash
by liz
in thread max value in a hash
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |