Re: array of hashrefs

2005-11-06 Thread Shawn Corey
Octavian Rasnita wrote: Hi, I have tried the following test program: my @array = ( {a => 'aaa', b => 'bbb',}, {a => 'ala', b => 'bala',}, ); my @array2 = @array; $array2[0]{a} = 'nanan'; push(@array2, 'test'); use Data::Dumper; print Dumper [EMAIL PROTECTED]; The result was: $VAR1 = [

Re: array of hashrefs

2005-11-05 Thread Xavier Noria
On Nov 5, 2005, at 16:44, Octavian Rasnita wrote: I know why modifying an element from a hashref from the second array modifies that element in the first array and why the new pushed element in the second array is not shown in the first array, but I don't know how to create a second array wi

Re: array of hashrefs

2005-11-05 Thread John Doe
Octavian Rasnita am Samstag, 5. November 2005 16.44: > Hi, Hi > I have tried the following test program: > > my @array = ( > {a => 'aaa', b => 'bbb',}, > {a => 'ala', b => 'bala',}, > ); > > my @array2 = @array; > [...] > but I don't know how to > create a second array with all the elements of