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

I am working on a cgi script and everything is working except for the refresh code that I have entered for refreshing the page. Any help is appreciated.

Below is the first part of the code:

#!/usr/bin/perl use CGI ':standard'; use LWP::Simple qw/get/; print "Content-type: text/html\n\n"; print "<HTML>\n"; print "<HEAD><TITLE>\n"; print qq{<meta http-equiv="refresh" content="5;URL=http://url.....:po +rt/cgi-bin/upgprocess.cgi">}; print "</TITLE></HEAD>\n"; print "<b><CENTER><p>Server Status</p></CENTER></b>\n\n"; print "</HTML>\n"; print "<TABLE BORDER =0 align=center>\n";

Replies are listed 'Best First'.
Re: Meta Refresh Tag not working
by ikegami (Patriarch) on Jan 18, 2011 at 20:40 UTC
    Invalid HTML. The TITLE element can only have text for content. META elements may only appear as children of a HEAD element, and only after the TITLE element. (Parsers should make an exception for a Content-Type equiv.)
      Thank you for pointing that out. That was my problem. I broke out the HTML and then rearanged the location of the meta refresh tag and that did the trick.
Re: Meta Refresh Tag not working
by arpad.szasz (Pilgrim) on Jan 18, 2011 at 20:38 UTC

    Your HTML code isn't valid. Please try the following:

    #!/usr/bin/perl use CGI ':standard'; use LWP::Simple qw/get/; print "Content-type: text/html\n\n"; print "<HTML>\n"; print "<HEAD>\n"; print "<TITLE></TITLE>\n"; print qq{<meta http-equiv="refresh" content="5;URL=http://url.....:po +rt/cgi-bin/upgprocess.cgi">}; print "</HEAD>\n"; print "<BODY>\n"; print "<b><CENTER><p>Server Status</p></CENTER></b>\n\n"; print "<TABLE BORDER =0 align=center>\n"; print "</BODY>\n"; print "</HTML>\n";