in reply to Socket recv?

  1. You do know you should be using 'use strict;', right?
  2. You are not checking the return values of either the send or recv. This might shed some light on what is going on
  3. Closing of the socket will not change $socket to null, or unset it. An exception state on the socket will not terminate the loop

fnord