in reply to Why does perl expression in empty nested hash create parents
is short for$a{a}{a}{a}
$a{a}->{a}->{a}
When the operand of a dereference (e.g. LHS of "->") is undef, it gets vivified into the right kind of reference. That means the above is short for
( ( $a{a} //= {} )->{a} //= {} )->{a}
Solution? "no autovivification;"
|
|---|