perlfaq nodetype
faq_monk
<P>
If you say something like:
<P>
<PRE> somefunc($hash{"nonesuch key here"});
</PRE>
<P>
Then that element ``autovivifies''; that is, it springs into existence whether you store something there or not. That's because functions get scalars passed in by reference. If
<CODE>somefunc()</CODE> modifies
<CODE>$_[0]</CODE>, it has to be ready to write it back into the caller's version.
<P>
This has been fixed as of perl5.004.
<P>
Normally, merely accessing a key's value for a nonexistent key does
<EM>not</EM> cause that key to be forever there. This is different than awk's behavior.
<P>