in reply to Reading multiple files at the same time
I think you want to use four-argument select, or else the more housebroken IO::Select. Those can be used to sleep until some file handle from a set you watch is readable.
After Compline,Zaxo