Hi

 

I am working with subarrays in a main array. When I copy the main array:

 

my @mainarray = ([1,2,3],[4,5,6],[7,8,9])

my @arraytwo = @mainarray

 

the references get copied. When I then modify the subarray data in
@arraytwo they are of course also modified in @mainarray. 

 

So I use the command:

 

push @arraytwo, [EMAIL PROTECTED] for @mainarray

 

to copy the array. Is there a nicer way to do it?

 

Reply via email to