in reply to Re^2: Can't Get CGI Results Page to Redirect
in thread Can't Get CGI Results Page to Redirect
The idea is to wait until the absolute last second to print either header.#!/usr/bin/perl use strict; use warnings; use CGI qw/:standard/; my $q = CGI->new(); my $do_redirect = 1; # for example only # ... build the entire output into a string $str = "This is your concatenated HTML doc"; if ($do_redirect) { print redirect($url); } else { print $q->header(), $str; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Can't Get CGI Results Page to Redirect
by socrtwo (Sexton) on Aug 05, 2009 at 13:54 UTC |