if (IO::Select->new(SOCKETHANDLE)->can_read($timeout)) { do the socket read as normal } else { you timed out }