You're going to end up using a template system eventually anyway, and
It's easy to use, and
Your life is so, so much easier when you do as little HTML in code as you can get away with.
For the HTML I absolutely have to generate by hand, I use a combination of HEREDOCS, CGI.pm methods, and interpolated strings. Whichever is most readable.
Comment on Re: Simple HTML Generation: Please Advise