@bits = $selectFD->can_read(30); if (@bits == 0) { # we timed out } else { for (@bits) { blah blah blah } }