in reply to Re: exists on hash autovivifies right?
in thread exists on hash autovivifies right?
No, not really. exists never autovivifies, but it doesn't prevent anything else (such as ->) from causing autovivification. In the given example ($x->{a}->{c}), the first -> autovivifies $x and the second -> autovivifies $x->{a}. This occurs independently of exists.
>perl -le"$x->{a}->{c}; print $x; print $x->{a}" HASH(0x225f18) HASH(0x226020)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: exists on hash autovivifies right?
by Anonymous Monk on Jun 29, 2008 at 20:52 UTC |