... my $pid = fork; if ( !defined $pid ) { # maybe report an error to the browser... } elsif ( $pid == 0 ) { exec( 'wrapper_script', 'recipient@email', @other_args ); } else { # print a simple HTML page to the client, saying that the job is # running and results will be emailed as soon as the job finishes } __END__