if ( exists $test_hash{$key1}{$key2} ) { print "The double key exists\n" ; }