On Tue, Apr 11, 2006 at 10:05:15AM -0300, Augusto Flavio wrote:
> #!/usr/bin/perl
> use CGI qw/:standard/;

Seems to be missing a use strict and use warnings here.

> print "Content-type: text/html\n\n";

You end you HTTP headers here (by printing two new lines).

> print redirect('http://www.yahoo.com');

Then you send more HTTP headers here, and your script probably
shouldn't be outputting a content-type header if its redirecting, let
the server handle that side of things.

#!/usr/bin/perl
use strict;
use warnings;
use CGI;
my $cgi = CGI->new();
print $cgi->redirect('http://www.yahoo.com');

-- 
David Dorward                                      http://dorward.me.uk


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to