in reply to Re^3: Double Click of Death on Perl Web Server
in thread Double Click of Death on Perl Web Server

Fork it:
my $server = IO::Socket::INET->new(...); while (my $client = $server->accept) { if (my $pid = fork()) { # parent waits for another connection close $client } elsif (defined $pid) { # child handles the request while (<$client>) { ... } ... close $client; close $server; exit; } } close $server;

2018-10-06 Athanasius changed pre tags to code tags