use strict; use warnings; my %hash_name = (a => 1, b => 2, c => 3); my ($max_key, $max_value) = each %hash_name; while (my ($key, $value) = each %hash_name) { if ($value > $max_value) { $max_key = $key; $max_value = $value; } } printf "Max value is %d, which corresponds to key %s\n", $max_value, $max_key; #### 1:13 >perl 1994_SoPW.pl Max value is 3, which corresponds to key c 1:18 >