in reply to Re: Forking problems
in thread Forking problems

undef will evaluate to 0 in numeric context, so you'll really want:
if (!defined(my $pid = fork)) { print "Oh no\n"; } elsif ($pid == 0) { print "in child\n"; } else { print "in parent\n"; }