http://www.perlmonks.org?node_id=136391


in reply to Re: mysterious fork() failure
in thread mysterious fork() failure

So,
if (!defined($pid = fork())) { # parent process, fork() failure } elsif ($pid == 0) { # child process, successful fork() } elsif ($justSomeVar == 1) { # parent process, successful fork() } else { # parent process, successful fork() }
is the way to go?