Re: How to redirect to webpage using perl?



"Rocky Jr." <rockdalinux@xxxxxxxxx> wrote in
news:1120069128.149893.72360@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

> In php I can use:
> header("Location http://www.mydom.com/";);

Argh! Please see the CGI spec for the correct format of that header.

> How can i do same with Perl under Apache+BSD server. I have also
> visited http://perl.apache.org/docs/2.0/user/config/config.html but no
> help found.

#!/usr/bin/perl

use strict;
use warnings;

$| = 1;
use CGI;
print CGI::redirect('http://www.mydom.com/');

__END__

See also:

perldoc CGI
perldoc -q CGI

Sinan
--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
.



Relevant Pages