#!/usr/bin/perl -w use CGI qw(:standard); $| = 1; if (my $pid = fork) { print header,start_html("start"); print (''); print h1('Starting...'); print ('If it does not start up, click here'); print end_html(); } else { close STDIN; close STDOUT; system ('echo \'\' > /www/html/results/file.html'); exec '/www/cgi-bin/run.pl > /www/html/results/file.html &'; die "couldnt exec - $!\n"; }