in reply to a referencable array slice (so assigning to it modifes the original)
You should be able to achieve this with Data::Alias. I can't test it, due to my need to stick with perl 5.8.8 on win32--sigh.
use Data::Alias; use Data::Dumper; my @foo = qw( A T T G C ); alias my @view = @foo[1,2]; $view[0] = 'x'; print Dumper \@foo;
TGI says moo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: a referencable array slice (so assigning to it modifes the original)
by muenalan@cpan.org (Initiate) on Jun 18, 2008 at 14:06 UTC | |
by TGI (Parson) on Jun 18, 2008 at 16:50 UTC | |
by muenalan@cpan.org (Initiate) on Jun 18, 2008 at 18:47 UTC | |
by TGI (Parson) on Jun 18, 2008 at 20:53 UTC |