Luke Palmer <[EMAIL PROTECTED]> writes: > Gordon Henriksen writes: >> my $ref = [EMAIL PROTECTED]; >> $$ref = "value"; >> print '@ary[0] : ', @ary[0], "\n"; # -> @ary[0] : value > > That has to do with autovivification semantics. Particularly, do things > autovivify when you take a nonconstant reference to them.
I think it's better seen as part of the semantics of references to nonexistent values. When you take a ref to a value slot that doesn't exist, you effectively create a tied variable that knows how to create that slot, and will do so only when you assign to it. /s