Hello All
I need to create an array with references while each cell of the array pointing to his own array in a way - so I can loop this reference array get into the 5 arrays that he pointing on and push the same lines into the different arrays. I tried to do something like this:
my(@arrA);
my(@arrB);
my(@arrC);
my(@arrD);
my(@arrE);
my($ref_to_arrA) = \@arrA;
my($ref_to_arrB) = \@arrB;
my($ref_to_arrC) = \@arrC;
my($ref_to_arrD) = \@arrD;
my($ref_to_arrE) = \@arrE;
@Ref_to_Arr = {$ref_to_arrA, $ref_to_arrB, $ref_to_arrC, $ref_to_arrD, $ref_to_arrE} # I initial the reference array with a pointers to my 5 arrays
my($moo);
foreach $moo (@Ref_to_Arr){
push(@Ref_to_Arr, "HELLO WORLD! ");
} #I want to go all over the Ref_to_Arr array and with the help of the references to push my string into my 5 arrays - @arrA @arrB @arrC @arrD @arrE
Now I expect, that if I will print the content of @arrA @arrB @arrC @arrD @arrE so I will see in every array the string: HELLO WORLD...
But something with the syntax is wrong...
Glad if you know how I can make it work...
Thanks a lot in advance!!
