while (1) { #------------------------------------------------------------------- # Connect via a socket to the server #------------------------------------------------------------------- logmsg "Creating a socket on host $remote_host, port $port"; my $sock = new IO::Socket::INET( 'PeerAddr' => $remote_host, 'PeerPort' => $port, 'Proto' => 'tcp', 'Type' => SOCK_STREAM, # 'Blocking' => 0, # hope this override default use of Nagle algorithm ); die "Socket could not be created to host $remote_host, port $port. (Do you mean to run with '-i localhost' ?) Reason: $ERRNO" unless $sock;