I found myself needing a specific doctype the other day and this is what I found… First, get the correct doctype string from the W3C website list. Then, simply use -dtd to specify it to CGI.pm during the call to start_html:
1
2
3
-dtd=>'-//W3C//DTD HTML 4.01 Transitional//EN'
-OR-
-dtd=>['-//W3C//DTD HTML 4.01//EN','http://www.w3.org/TR/html4/strict.dtd']
In addition, use -encoding to specify the character set for XHTML. It defaults […]
To generate a redirection header in CGI.pm use the following syntax where $q is the cgi handle: print $q->redirect(‘http://wyzaerd.com/documents/resume.pdf’); If you use redirection like this, you should not print out a header as well. You should always use full URLs (including the http: or ftp: part) in redirection requests. Relative URLs will NOT work correctly.