in reply to Multiple STDIN sources
iselect solves a similar problem in a general way but may not be useful to you directly.