You don't necessarily need threads, but you can certainly use them to good effect.
use threads; ## start the first command going my $t1 = async { return qx[ ... ]; }; ## Start the second command running. my $t2 = async { return qx[ ... ]; }; ## wait for the first to finish and retrieve the output my $output1 = $t1->join; ## wait for the second to finish and retrieve the output my $output2 = $t2->join;
Doing that in a loop rather than separately is quite trivial.
In reply to Re: Do I need threads?
by BrowserUk
in thread Do I need threads?
by TechFly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |