in reply to No autovivification, for loop aliasing, lvalue vs rvalue in for loops
this
for my $e (@{[ $$n{'y'} ]}) { }
has no possible autovivification. It copies the list within [] and translates to
for my $e (@{[ undef ]}) { }
Nota Bene: there is a fundamental difference between \@a and [@a] !
While both are array refs, only the first one keeps a link to @a while the latter is only an anonymous copy.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|