in reply to Creating a copy of an array
my @first = ( ['1','2','3'], ['11','22','33'] ); my @second = map { reref ( @$_ ) } @first; $first[0][2] = 4; print "$first[0][2]\n"; print "$second[0][2]\n"; sub reref { my @out = (); push (@out, $_) for @_; return \@out; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Creating a copy of an array
by repson (Chaplain) on Dec 19, 2000 at 06:37 UTC | |
by ichimunki (Priest) on Dec 19, 2000 at 10:27 UTC | |
by repson (Chaplain) on Dec 19, 2000 at 15:56 UTC |