if ($val == 2){; #rewind each my $a = scalar keys %hash; return "The key for 2 is $key\n" }