> 
> 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");
> 
> - Jan

redirect() does a header like header(), the first header 
that gets sent is the header, the rest is content, even if 
The contetn looks just like a header.

If you run that in a browser you'll probably see Location: /thanks.html 
in your screen. Since that is content for the header() you did above it. 
Make sense? I also remember hearing it's a better idea to use absolute 
url's in your Location header.

HTH

DMuey
> 
> jdavis wrote:
> 
> >Hello,
> > I have been able to use redirects with cgi.pm as long
> >as the redirect is the only thing in the script.
> >
> >i.e.
> >#!/usr/bin/perl
> >use CGI qw(:standard);
> >print redirect('http://google.com/');
> >
> >
> >but what i need to do is print a bunch of html , have perl do a few 
> >jobs on my system, and then do a redirect when its done.
> >
> >is this possible?
> >
> >thanks,
> >--
> >jdavis <[EMAIL PROTECTED]>
> >
> >
> -- 
> Common sense is what tells you that the world is flat.
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED] 
<http://learn.perl.org/> <http://learn.perl.org/first-response>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to