Using the
select system call (which is what
IO::Select does) is a tried and true technique for writing servers or other applications which need to multiplex I/O. The late
W. Richard Stevens does an excellent job explaining this and other techniques in chapter 6.
Arjen