in reply to Wait for next

I would imagine you want fork(), so you can process mutiple connections at once. Lincoln Stein's book "Network Programming With Perl" covers a few diffrent ways of doing this with, or without fork ... but i usually find fork the best. Here is some pseudo code (untested, but you get the idea):
# setup $server as before while ($client = $server->accept()) { my $pid = fork(); if ($pid) { #parent my $hostinfo = gethostbyaddr($client->peeraddr); print "[$hostinfo being Handled by child with pid $pid]\n"; } else { #child print $client "Welcome to $0.\n"; system(qw/sleep.pl/); close($client); } }

$ perl -e 'do() || ! do() ;' Undefined subroutine &main::try