CGI URL Redirect

B

- Bob -

I'm familiar with using this raw statement to cause a redirect via a
CGI:

print "Location: http://www.someplace.yyy \n\n";


Is there a more modern way I should be doing it now. Something
built-in and/or more object oriented?

Thanks,
 
K

krakle

I'm familiar with using this raw statement to cause a redirect via a
CGI:

print "Location:http://www.someplace.yyy\n\n";

Is there a more modern way I should be doing it now. Something
built-in and/or more object oriented?

Thanks,

You could use CGI.pm

my $cgi = new CGI;
print $cgi->redirect("http://www.yahoo.com");

But really, it's still printing the standard redirect header (which
hasn't changed since the beginning of HTTP)...

There's not a "modern" way because it has never changed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top