next if $results{$val} and $hash->{$key1} and $hash->{$key1}->{$key2};