How To Declare DOCTYPE And Encoding Using CGI.pm And PERL

Author: , May 31st, 2011

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:

In addition, use -encoding to specify the character set for XHTML. It defaults […]