use strict;
use warnings;
use Data::Dumper;

my %hash = ();

if (exists $hash{nonexistent}) {
    print "Something is REALLY wrong\n";
}

if (exists $hash{vivificated}->{nonexistent}) {
    print "OH SHI~\n";
}

if (exists $hash{vivificated}) {
    print "Just as planned ;)\n";
}

print "The hash is: " . Dumper(\%hash);