The behavior that you're complaining about is called autovivification. See How can I check if a key exists in a multilevel hash? from perlfaq4 for some tips on accomplishing what you want to do.
In reply to Re: perl: restrict perl from automaticaly creating a hash branches on check
by dasgar
in thread perl: restrict perl from automaticaly creating a hash branches on check
by alex5161
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |