in reply to a way to handle the multiple processes output
open(my $pipe, "cat foo |") or die $!;
Then you can read from that pipe to get output as it comes in:
while (<$pipe>) { print $_ }
If you need to read from multiple kids at once, use IO::Select:
-sam
|
|---|