golfing
DB<105> %h=(); print $h{key} //= 0; 0 DB<106> \%h => { key => 0 }
Update: beware that like this values like undef are not allowed!
Otherwise better use exists
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re: Perl Hash Behavior.
by LanX
in thread Perl Hash Behavior.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |