in reply to exists (EXPR), autovivified and conditionals
The key d in $a->{a}{b}{c}{d} doesn't exist, but look at the magic birth of those hashes ;)$a = {}; warn "exists " if exists $a->{a}{b}{c}{d}; use Data::Dumper; die Dumper($a); __END__ $VAR1 = { 'a' => { 'b' => { 'c' => {} } } };
As for Q2, your diagnosis is faulty (whatever the problem is, it's not directly in the snippet you presented). BTW, I find $hash{$key}->() more syntactically appealing ;)
|
|---|