I am supposed to run 5000 external commands with 60 commands running at any point of time through the perl script. So I am using perl's parallel fork manager and set the max procs to 60 and running each external commands through each of these forked child process.
Now I want to get the stdout and stderr from each of these external commands. I prefer getting the stdout and stderr into a variable rather than writing them to each file. What is the best possible way to get the stdout and stderr from these external commands into a variable? My external command prints out some statistics which I want to parse and store in an hash array.
I also tried using threads and open3 but in vain. I am ok with any solution which runs 60 of my external commands (out of 5000) at any given point of time
In reply to capture stdout and stderr from external command by pankajadvani
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |