to DWIM? It prints " 2", and I would like "2 2".use Lexical::Alias qw(alias); my @array; alias $array[0], $array[1]; $array[1] = 2; print "@array";
P.S. Will Perl 6's runtime bindings do this?
Update: I should note that I tried alias_r \$array[0], \$array[1];, and it doesn't work either. Don't bother ;-)
In reply to Aliasing values, not variables by nothingmuch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |