Thank you for your clear and complete reply. It illuminates questions I hadn't even realized existed until the advent of this thread.
... I think [the current solution] is the wrong solution because it creates a dichotomy.
It also seems likely to create a few face-plants when people stumble over this little oddity.
If you assign to a non-existent element of an array through a reference, a scalar is autovivified in that place ... And, IMO, a similar thing should happen when non-existent elements of an array are aliased by passing them to a subroutine.
This is certainly the behavior I was expecting, and that I would consider most useful.
Once again, thanks for this enlightening post.
Give a man a fish: <%-{-{-{-<
In reply to Re^10: What does my @x= (undef)x7; do?
by AnomalousMonk
in thread What does my @x= (undef)x7; do?
by gepebril69
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |