my $child=fork(); die "Can't fork: $!" unless defined $child; if ($child) { handle_task_one(); } else { handle_task_two(); }