in reply to Re: Dup & redirecting filehandles
in thread Dup & redirecting filehandles

Are you checking the return values of things like open? Just because you have an open statement in your code does not necessarily mean you will have an opened file handle right after it. Be sure open succeeded.