in reply to Max value
Here is another solution: argmin & argmax. In your case, expensive_func($_) would just be $hashName{$_}.