if ( exists $hash{keyA} and exists $hash{keyA}{keyB} and exists $hash{keyA}{keyB}{keyE} and exists $hash{keyA}{keyB}{keyE}{keyF} ) {