Hi,
like this:
#!/usr/bin/perl -w
use strict; use CGI; use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
print $q->header # do this - do that, using $q
print $q->redirect("/thanks.html");
Unfortunately, this doesn't work. As Randal already said, it's not possible to do both. You either print a page, or redirect to another page. Here's a quote from CGI.pm POD:
print $query->redirect('http://somewhere.else/in/movie/land');
Sometimes you don't want to produce a document yourself, but simply
redirect the browser elsewhere, perhaps choosing a URL based on the
time of day or the identity of the user.
The redirect() function redirects the browser to a different URL. If
you use redirection like this, you should not print out a header as
well.
Hope that helps.
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>