in reply to Re: Exists and autovivification (was: Looping through a hash reference...)
in thread Looping through a hash reference is creating a key...?
Taking a reference is an "lvalue context". So this isn't an exception but part of the same rule. Even in C, you can't take the address of a non-lvalue (it might be 'const' aka 'read-only', of course).
The $hash{key1}{key2} autovification of 'key1' has long been considered a minor bug. So I'd hope that backward compatability to bugs isn't a good reason to a prevent fixing them.
- tye
|
|---|