You're prints from the child are buffered. Set $| = 1; in the child, after you reopen STDOUT.
I see a couple of other problems. The parent appears to only read one name, and the child does not exit 0; when done.
After Compline,
Zaxo
In reply to Re: Fork and pipe
by Zaxo
in thread Fork and pipe
by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |