http://qs1969.pair.com?node_id=343864


in reply to Re: Windows filehandles and fork
in thread Windows filehandles and fork

i guess that under windows fork is implemented using threads so the child does not have his own STDOUT.
My guess is that that is indeed what is happening.
Why are you dont you open a new filhandle in each child process
Because he wants to use it together with system(), and that won't work as intended, with any other filehandle.

Update: Gee, Koosemose appears to be right, this does seem to work right (at least on Win98):

open CHILDOUT, ">test.txt"; select CHILDOUT; system('perl -le "print q(Hello!)"');

I think that would indeed solve it.