Help for this page
local *STDOUT; local *STDERR;
my $thread1 = threads->create ( \&worker, 1, 'sub1.log' ); my $thread2 = threads->create ( \&worker, 2, 'sub2.log' ); ... $thread2->join(); exit 0;
my @threads = map {threads->new(\&worker, $_, "sub$_.log")} 1..2; $_->join for @threads; exit 0;