note chromatic <p>With regard to:</p> <c>foreach my $host ( @servers ) { threads->new(\&process, $host )->join(); }</c> <p>... creating a new thread and then immediately <c>join</c>ing it is a waste of time; <c>join</c> waits for the thread to finish.</p> <p>In this case, <c>detach</c> is probably better. Otherwise, keep an array of all threads and <em>after</em> you've created all of them, then <c>join</c> all of them.</p> <div class="pmsig"><div class="pmsig-1382"> <hr /> <p>Improve your skills with <a href="">Modern Perl: the free book</a>.</p> </div></div> 949944 949981