$hash{key1}{value1} = 1; $hash{key1}{value2} = 2; $hash{key2}{value3) = 1; #### my $check = scalar keys %{$hash{$key}}; #### forach my $k (keys %{$hash{$key}}) { # $k == the value i am looking for. }