IMHO there is no reason to spend any time to learn to hardcode HTML code in your Perl script. Using templates for separation of HTML from code is much more robust aproach. CPAN has a number of
modules for templates. For example
HTML::Template. IMHO CGI.pm is only useful for param parsing and handling file uploads.