in reply to Perl fork problem

Also remember that buffering plays a part in exactly when a message appears. Setting $|=1 will make STDOUT unbuffered, and might alter the order: as it may if you print to STDERR instead.

Replies are listed 'Best First'.
Re^2: Perl fork problem
by chromatic (Archbishop) on Aug 13, 2008 at 20:39 UTC

    Unless the OP has done something we can't see, STDOUT is line-buffered by default, in which case buffering doesn't matter here at all and is not the issue.