Hi, I am calling two seperate fuctions defined under two different perl modules via two independent threads. Now, I use the $thr->join; command to wait for the first thread to complete and then start the second. But it seems that the two module functions are being executed simultaneously. The interpreter throws error saying that some variables which are used in the second function is uninitialised. Actually , those were defined in the first function. My code looks something like this:
*use threads;* *use strict;* *use warnings;* *use module1;* *use module2;* ** *my $thr1 = threads->new(\&func_module1);* *$thr1->join;* ** *my $thr2 = threads->new(\&func_module2);* *$thr2->join;* Note: The func_module1 & func_module2 are subfunctions defined under moule1 & module2 respectively. Please suggest a solution for this issue. Regards, Kelvin