Checking for $hash{a}{b} causes $hash{a} to suddenly contain the reference to an anonymous hash that is checked for the 'b'.
And the exception to this is when using
threads::shared:
Taking references to the elements of shared arrays and hashes does not autovivify the elements, and neither does slicing a shared array/hash over non-existent indices/keys autovivify the elements.
Thus, the following results in a runtime error:
use strict;
use warnings;
use threads;
use threads::shared;
my %hash :shared;
print '$hash{a}{b} ', ( exists $hash{a}{b} ) ? "exists" : "doesn't ex
+ist";
Remember: There's always one more bug.