my %smallest; for my $k (keys %hash) { my $v = (sort { $a <=> $b } @{$hash{$k}})[0]; # assuming numeric values $smallest{$k} = $v; }