$SIG{PIPE} = "IGNORE"; .... print($socket $string) || die "Error writing to socket: $!"