use strict; use warnings; use IO::Socket::INET; $|++; warn "Client $$ initialized\n"; for (0..4) {   my $pid = fork;   last unless $pid;   warn "Client $pid forked\n"; } sleep 3; while ( 1 ) {   my $socket = IO::Socket::INET->new(      PeerAddr => '127.0.0.1',      PeerPort => 50010,      Proto    => 'tcp',      Type     => SOCK_STREAM,   ) or die "client: can't connect to 127.0.0.1:50010";   warn "Client $$ connected to server\n";   print $socket "$$\n";   close($socket);   sleep 1; }