@array_of_hosts while(hostsleft){ fork() if child{ pop @array_of_hosts and go to town with that host } parent code{ pop @array_of_hosts and throw away value, continue on with loop } }