in reply to Re: sharing array of arrays between threads
in thread sharing array of arrays between threads

thank you so much for your help....
I've also tried the following... but I still have no luck getting this to work


my @X : shared;
my $var = &share([]);
for (my $i=0; $i< 222; $i++){
$X[$i] = $var;
}


sub abc {
my $Var2;
.... Here the string in $Var2 gets updated everytime abc is called
push(@{X[$i]}, $Var2);
}


thank you so much!!!

Replies are listed 'Best First'.
Re^3: sharing array of arrays between threads
by aitap (Curate) on Aug 11, 2012 at 08:25 UTC
    How exactly this doesn't work? Did you try using Data::Dumper to print your variables inside the threads?
    Sorry if my advice was wrong.