Perl: the Markov chain saw | |
PerlMonks |
Re: hash assignment wierdnessby Errto (Vicar) |
on Apr 20, 2007 at 17:59 UTC ( [id://611212]=note: print w/replies, xml ) | Need Help?? |
The way to assign no elements to a hash is
After this statement defined %h returns false. Whereas is assigning a single key to the hash (whose value happens to be undef, and thus coerced into the empty string '') with no corresponding value, hence the warning. But after this assignment the hash is no longer empty, so defined %h returns true.
In Section
Seekers of Perl Wisdom
|
|