my $socket = new IO::Socket::INET ( LocalPort => $listen_port, Listen => 999, ReuseAddr => 1, Proto => "tcp", ) || die "can't create local socket: $@\n"; while(my $client = $socket->accept()) { while(my $buffer = <$client>) { ...