if (my $pid = fork) { ## Parent } elsif ($pid == 0) { ## Child } else { ## Error, $pid is undefined }