use strict; use warnings; my $pid = fork(); die "Fork failed" if not defined $pid; if ($pid) { #parent print "Parent output\n"; } else { #child exec q|perl -e 'sleep(1); print "Child output\n"'|; } wait; print "Parent finishing\n";
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re^3: Running perl scripts in parallel
by kennethk
in thread Running perl scripts in parallel
by perl_help26
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |