use threads; $Param3 = "foo"; $thr1 = threads->new(\&sub1, "Param 1", "Param 2", $Param3); $thr2 = threads->new(\&sub1, @ParamList); $thr3 = threads->new(\&sub1, qw(Param1 Param2 Param3)); sub sub1 { my @InboundParameters = @_; print "In the thread\n"; print "got parameters >", join("<>", @InboundParameters), "<\n"; } $thr1->join; ## Wait for thread 1 to finish $thr2->join; ## Wait for thread 2 to finish $thr3->join; ## Wait for thread 3 to finish __END__ C:\test>junk2 In the thread got parameters >Param 1<>Param 2<>foo< In the thread got parameters >< In the thread got parameters >Param1<>Param2<>Param3< #### use threads; $Param3 = "foo"; threads->new(\&sub1, "Param 1", "Param 2", $Param3)->detach; threads->new(\&sub1, @ParamList)->detach; threads->new(\&sub1, qw(Param1 Param2 Param3))->detach; sub sub1 { my @InboundParameters = @_; print "In the thread\n"; print "got parameters >", join("<>", @InboundParameters), "<\n"; } ## wait long enough to ensure that the threads ## will have completed before we let the main thread ## and the process die. sleep 10; __END__ C:\test>junk2 In the thread got parameters >Param 1<>Param 2<>foo< In the thread got parameters >< In the thread got parameters >Param1<>Param2<>Param3<