in reply to How to make sysread timeout
Typically you would use select (if you follow the link, you want the 4-arg version of select) or IO::Select to handle the timeout.
Frying pan on the stove
Results (364 votes). Check out past polls.