if (my $pid = fork()) { # a true or non-zero value for the parent # stuff } else { # a false value or 0 for the child # stuff }