in reply to RE: RE: Re: A Not so Simple Append
in thread A Not so Simple Append
Look at perlref, item 6 on how to create a reference is to dereference them in a context that assumes they exist. That is why chained lookups autovivify, to continue down the chain the previous lookups were dereferenced in a context that assumed they existed. Likewise if you start assigning to stuff, it autovivifies. That holds for hashes and variables.
Now merlyn certainly knows this piece of documentation, so why do we disagree on whether it is documented? Well to his eyes this requires serious "reading between the lines" and you cannot expect people to figure it out. To mine, well the reader's attention is not drawn to the point, but once I saw that this is the rule that applies, I have not since run into an autovivification situation which I had trouble understanding...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE (tilly) 4 (autovivify): A Not so Simple Append
by merlyn (Sage) on Oct 03, 2000 at 18:46 UTC | |
by tilly (Archbishop) on Oct 03, 2000 at 18:47 UTC | |
by Fastolfe (Vicar) on Oct 03, 2000 at 18:49 UTC |