if (exists $hash_ref->{$block} && !defined $hash_ref->{$block}->{$libName}) { print "This is a test\n"; }