I would like to call other Perl scripts in order to perform a contention test from with a main Perl script.
Something like this currently works:
system("perl 1.pl");
system("perl 2.pl");
exit;
However, I would like to kick these off as independent threads running at the same time.
I tried, based on my Google searches, doing something like this:
system(1, "perl 1.pl");
system(1, "perl 2.pl");
exit;
That doesn’t work. The main script exists immediately, which is fine, but the underlying threads I want to spawn don’t get kicked off. I was wondering if there was something else I have to do or if anyone else has done something like this.
Thanks for any help in advance.
This will wait for both to finish executing before the it will exit. I’m guessing this is what you want from your original question, right? If not feel free to drop a comment and edit your post to explain it better, and I’ll try again.