if ($pid = fork) { # I'm the parent } else { if (! defined($pid) ) { die "Can't fork: $!"; } # Child here }