in reply to Why does exists cause autovivication?
exists doesn't autovivify.
>perl -le "my %hash; exists($hash{foo}); print scalar %hash" 0
Dereferencing (->) does.
>perl -le "$hash->{foo}; print $hash ? 1 : 0" 1
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Why does exists cause autovivication?
by Argel (Prior) on Dec 29, 2007 at 21:12 UTC | |
by ikegami (Patriarch) on Dec 29, 2007 at 22:40 UTC | |
by Argel (Prior) on Dec 30, 2007 at 15:41 UTC | |
by demerphq (Chancellor) on Dec 31, 2007 at 08:51 UTC | |
by Argel (Prior) on Dec 31, 2007 at 19:41 UTC | |
| |
by tye (Sage) on Dec 30, 2007 at 17:13 UTC |