in reply to Re: forking in Tk and letting the dad alone deal with X stuff
in thread forking in Tk and letting the dad alone deal with X stuff

I hope in your actual code you have an exit() call in the child process.
Because if you don't, the child process will go back to the MainLoop after finishing with the while().
That won't happen in the example that you provided here, however.
# ... } else { open I,$fnm; print $wr $_ while($_=<I>); exit(); # Stick this after all your code }
--perlplexer