# add a new worker $count++; my $thread = threads->new(\&worker, $count); }