use threads; while ($c < 100000){ @thr_ll[$c]=threads->new(\&sys_call,$c); @thr_ll[$c]->detach(); $c++; } sub sys_call(){ print "Called: $_[0]\n"; } #### use threads; while ($c < 100000){ my $thr=threads->new(\&sys_call,$c); $thr->detach(); $c++; } sub sys_call(){ print "Called: $_[0]\n"; }