in reply to redirect in more than standalone mode
If the browser supports Netscape's "refresh" headers (and what browser doesn't, these days?), you can give it a few seconds in which to render the page before redirecting.
To demonstrate, here's a variation of friedo's code:
#!/usr/bin/perl use strict; use warnings; use CGI; my $q = CGI->new; my $delay_seconds = 4; my $url = 'http://somewhere.com/'; print $q->header( -type => 'text/html', -refresh => "$delay_seconds; $url", ); print "<h1>Here's some HTML.</h1>";
Tested with Firefox and Apache.
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
|
---|
In Section
Seekers of Perl Wisdom