in reply to a way to handle the multiple processes output

You probably need open, and perhaps you need to disable buffering, $|=1. See perlvar for a description of $|.