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


in reply to Re^4: Running a process in the background
in thread Running a process in the background

undef == 0 - use defined instead:
if (my $pid = fork) { ## Parent } elsif (defined $pid) { ## Child } else { ## Error, $pid is undefined }