#!/usr/bin/perl ################################## # # main.pl # ################################# use strict; use CGI::Carp 'fatalsToBrowser'; ######### Here we go: We read the forms and so ..... use Win32; use Win32::Process; my $ProcessObj; my stuffTerminated = false; Win32::Process::Create($ProcessObj, "c:/perl/bin/perl.exe", "perl c:/myPerlScriptsDir/waiting.pl", 0, NORMAL_PRIORITY_CLASS, ".") || die "Create"; ######### do stuff while user waiting sleep(10); ######### when we are done, we signal waiting.pl open S, ">c:/MyPath/signal.xxx"; print S "stuffTerminated"; close S; print "Content-type: text/html\n\n"; print "Thank you for waiting... blah-blah-blah"; exit; #!/usr/bin/perl ################################## # # waiting.pl # ################################# use strict; use CGI::Carp 'fatalsToBrowser'; if ( ! open(S, "c:/MyPath/signal.xxx") ) { #redirect to waiting my $redirect = "http://myserver/mywebsite/waiting.htm"; print "HTTP/1.0 303 See Other\r\n" if $ENV{PERLXS} eq "PerlIS"; # for perlIS.dll"; print "Location: $redirect\n\n"; } exit; ################################# # #NOTE: waiting.htm has a refresher to waiting.pl ################################