nsluis has asked for the wisdom of the Perl Monks concerning the following question:
Hi!
I was playing around with arrays and came across something I
didn't expect:
@first = ( '1','2','3', '11','22','33' );
@second = @first;
$first[0]2 = 4;
print "$second[0]2\n";
The result will be 4. I don't want that :) How can I create a
copy of the first array without them being 'linked'?
TIA,
Nanne
Back to
Seekers of Perl Wisdom