in reply to IO::Select can_read/can_write timeout question

Set the SO_KEEPALIVE option on your socket and let your OS do the hard work for you!
use Socket qw(SOL_SOCKET SO_KEEPALIVE); setsockopt($socket, SOL_SOCKET, SO_KEEPALIVE, 1);