use threads; $Param3 = "foo"; $thr = threads->new(\&sub1, "Param 1", "Param 2", $Param3); $thr = threads->new(\&sub1, @ParamList); $thr = threads->new(\&sub1, qw(Param1 Param2 Param3)); sub sub1 { my @InboundParameters = @_; print "In the thread\n"; print "got parameters >", join("<>", @InboundParameters), "<\n"; } __OUTPUT__ D:\>perl thr_test.pl In the thread got parameters >Param 1<>Param 2<>foo< In the thread got parameters >< A thread exited while 2 threads were running. D:\>perl thr_test.pl In the thread got parameters >Param 1<>Param 2<>foo< A thread exited while 3 threads were running. D:\>perl thr_test.pl In the thread got parameters >Param 1<>Param 2<>foo< A thread exited while 3 threads were running. #### use strict; use warnings; use threads; no warnings 'threads'; my @ParamList = qw (1 2 3); my $Param3 = "foo"; my $thr = threads->new(\&sub1, "Param 1", "Param 2", $Param3); $thr = threads->new(\&sub1, @ParamList); $thr = threads->new(\&sub1, qw(Param1 Param2 Param3)); sub sub1 { my @InboundParameters = @_; sleep 10; print "In the thread\n"; print "got parameters >", join("<>", @InboundParameters), "<\n"; } __OUTPUT__ D:\>perl thr_test.pl A thread exited while 4 threads were running. D:\>perl thr_test.pl A thread exited while 4 threads were running. D:\>perl thr_test.pl A thread exited while 4 threads were running. D:\>perl thr_test.pl A thread exited while 4 threads were running.