Also, $sock is not the right socket to be reading from anyway.
In reply to Re^3: Problem with IO::Select by Thelonius in thread Problem with IO::Select by Anonymous Monk