chuleto1 has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks:
I am having problems redirecting using the CGI module
$q = new CGI; $q->redirect( -location=>"train1.htm");
This is not working for me. Any hints?
Thank you,
Arturo Ordaz

Replies are listed 'Best First'.
Re: cgi redirect
by blokhead (Monsignor) on Jul 31, 2003 at 18:30 UTC
    The redirect method simply returns the text of the redirect header, you still have to print it!
    print $q->redirect("train1.htm");
    Also be sure that no other headers (Content-type, etc) are printed before this line.

    blokhead

      Guh... I remember making that very mistake just a month ago. So aggravating, and so embarassing when I realized that that was the problem...