First thing, if you are generating a redirect, then you can print the content-type header within the same space using an array ref like below.
Your method looks like it should work, although I think you might want to put the time and the URL within the "content" space. With my host I'm getting an error saying that &main::meta is undefined, so I'm not sure if we're running an older version of CGI.pm or missing supporting files. According to the CGI.pm documentation you should be able to do something like this though. print start_html(-head=>[ meta({-http_equiv => 'Content-Type', -content => 'text/html'}), meta({-http_equiv => 'refresh', -content => '5;URL=http://mydomain.homelinux.net/login.html'}) ]), p('Redirecting to login page'), end_html; ----- Scot Robnett inSite Internet Solutions [EMAIL PROTECTED] -----Original Message----- From: Admin-Stress [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 3:45 PM To: perl cgi Subject: RE: html redirect using CGI.pm print $query->redirect(-uri=>'http://somewhere.else/in/movie/land', -nph=>1); I found the example, but I dont know how to put the 'seconds', like will be redirected after 5 seconds. --- Scot Robnett <[EMAIL PROTECTED]> wrote: > You might want to just use redirect(), check perldoc CGI > > ----- > Scot Robnett > inSite Internet Solutions > [EMAIL PROTECTED] > > > > -----Original Message----- > From: Admin-Stress [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 09, 2002 2:42 PM > To: perl cgi > Subject: html redirect using CGI.pm > > > Hi, > Could someone check my code below? I need to redirect to a html using CGI.pm > perl module. But when > I executed, I got blank page. If I commented out $cgi->start_html ... it's > working fine, but no > redirection. > > $cgi = new CGI; > > sub Error { > my ($msg) = @_; > print "<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>"; > print "<TABLE border='0' width=500 align=center bgcolor=#C7D7F3>"; > print "<TR><TH align=center bgcolor=#FF0000><font color=#FFFFFF> Error > </font>"; > print "<TR><TH> "; > print "<TR><TH align=center>$msg"; > print "<TR><TH> "; > } > > $upassword = $cgi->param('password'); > > if ($password ne $upassword) { > print $cgi->header; > print $cgi->start_html(-head=>meta({-http_equiv => 'Refresh', > -content => '5', > -url => > 'http://mydomain.homelinux.net/login.html'})); > Error "Wrong password."; > exit(0); > } > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]