If you're reading from the socket, and using IO::Select->can_read() to see if data is available, then when the other side disconnects, can_read() indicates that there is data to be read, but the data read is empty. Thats how I tell if a socket is closed. (The data was an EOF, I remember reading somewhere.)
C.