SPUG: CGI.pm and browser redirection
Christopher Cavnor
chris at enthusiasm.com
Mon Jun 12 20:09:05 CDT 2000
I have a script that, using CGI.pm, prints stuff to a Web page and redirects
when finished. Simple right? but I can't get redirect to work. I know that it
is doe to the header that is printed via CGI.pm, because all is well if I
disable it. Problem is, I need it - so I was wondering if anyone knows a
work-around. Here is the setup:
#!/usr/bin/perl -w
use strict;
use CGI::Carp qw/fatalsToBrowser/;
use CGI qw/:standard/;
my $html = new CGI;
print $html->header(-pragma=>'no-cache');
print $html->start_html;
print $html->p("stuff");
print $html->end_html();
#redirect to ananlysis page when finished
print $html->redirect( -location=>'http://207.202.194.220/analysis.html' );
exit();
Tried end_html before and after the redirect - no diffy. Appreciate any help,
thanks!
Chris
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
For Subscriptions, Email to majordomo at pm.org: ACTION spug-list EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address
More information about the spug-list
mailing list