if (my $pid = fork) { # parent ($pid is process id of child) parent_function(); } else { # child child_function(); exit; }