in reply to Aliasing values, not variables
(Did you know you can use local() on elements in lexical aggregates?)my @data = (1 .. 5); { local $data[2] = 100; print_data(); } print_data(); sub print_data { print "@data\n"; }
But moreso, because the elements in aggregates do not have symbols, I do not think they can be aliased. I would expect Perl 6 would make this possible.
|
|---|