in reply to Socket dilemma - sending EOF
#Before writting on the socket $sock->autoflush(); # so output gets there right away [download]
#when writting $data to the socket print $sock $data . "\015\012"; [download]
#when done writting to the socket close($sock); [download]