in reply to Strange Hash related bug, keys are created by themselves!
The following is another way when Autovivification is not desired.
if (exists $hash_ref->{$block} && !defined $hash_ref->{$block}->{$libN +ame}) { print "This is a test\n"; } [download]