I haven't any real experience with it, but there's also the autovivification pragma. Because I'm not familiar with it, I would tend to use it in the narrowest possible scope:
This also works with statement modifiers, e.g.:c:\@Work\Perl\monks>perl -wMstrict -le "use Data::Dump; ;; my %hash; dd \%hash; ;; if (do { no autovivification; exists $hash{foo}{bar}{99}{x}{y} }) { print 'got it'; } ;; dd \%hash; " {} {}
Give a man a fish: <%-{-{-{-<
In reply to Re: question on hash behavior
by AnomalousMonk
in thread question on hash behavior
by shamat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |