A very valuable tool is Data::Dumper that let's you inspect the contents of variables. In your case:
use Data::Dumper; print Dumper \%hash;
will show you that the two scenarios are not the same.
With Data::Dumper you can figure out most of these kind of questions.
In reply to Re: autovivication and referencing
by hdb
in thread autovivication and referencing
by Amblikai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |