The best solution is to use IO::Select, but a temporary solution to your problem is; before doing anything on the file handle(like open/read/write etc) just check whether it is alive by using fileno or eof functions, so that you can atleast avoid this 'bad file descriptor error'.
Just show the piece of code to give you clear directions.
This
http://www.perlmonks.org/?node_id=740330 might also help you.
UPDATE
I think that you are checking with $fdvec contents after select returns, if you are doing so, it is wrong; you have to check the contents of $rout. man perlipc may also help you.
Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.