> -----Original Message----- > From: Alex Read [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 26, 2002 1:01 PM > To: Bob Showalter > Cc: [EMAIL PROTECTED] > Subject: Re: Probably a stupid question > > > Thanks guys, > > I think this should be able to do what I want, as the browser goes > straight to the return page and prints 'HI1'. > Thanks again, > > Alex > > > > #!/usr/bin/perl > use strict; > > defined(my $pid = fork ) or die "Could not fork: $!"; > if ($pid){ > print "Content-type: text/html\n\n<html>"; > print "\nHI1\n\n</html>\n\n"; > exit; > } else {
Since you just exited above, you don't need to put the following code in an "else" block. > close(STDIN); > close(STDOUT); > close(STDERR); > exec 'sleep 10 ;echo "HI2"' Note, since you just closed STDOUT, the echo won't go anywhere. > } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]