That method of aliasing is interesting and occasionally useful, but it is hardly "The most general".
It's not limited to a scope like for and map aliasing. I did forget about glob aliasing.
my $y = do { local *temp = \$x; \our $temp };
It's more general in its breadth of types of aliases it can create, but it can't create an array of aliases.
resulting in two entirely separate, unconnected arrays:
You seem to have misread what I wrote. I didn't say it aliased the arrays.
In reply to Re^3: Alias vs Reference
by ikegami
in thread Alias vs Reference
by cheekuperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |