Does it have to be IPC? If so, you need to make a pipe to read from each of the child processes. It would be easiest to use IPC::Open2. Or you can just use a simple piped form of open. Here is a way to do it for just one child, loop it 3 times, for your needs. If you need them simultaneous, put the CHILD filehandles in a hash, and use IO::Select to read them.
#!/usr/bin/perl
use strict;
use warnings;
my $pid = open(CHILD, "-|");
if ($pid)
{
# parent
print "parent got:\n";
print while(<CHILD>);
close CHILD; # this waits on child
}
elsif ($pid == 0)
{
# child
print "kid here!\n";
exec '/bin/date' or die "Can't exec date $!\n";
}
else
{
die "fork error: $!\n";
}
I'm not really a human, but I play one on earth.
flash japh