in reply to Re^2: Running perl scripts in parallel
in thread Running perl scripts in parallel

Are you sure? If I'm understanding your comment, the only scenario where this should be true is if your fork is failing. What happens when you run this code:
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.

Replies are listed 'Best First'.
Re^4: Running perl scripts in parallel
by perl_help26 (Beadle) on Jul 24, 2014 at 07:05 UTC
    Actually, it's my bad ! it actually worked :) Thank u tons!