in reply to CGI and writing html/javascript/css elegantly

Others mentioned using a framework, but if you don't, at the very least, use a template engine like HTML::Template or Template Toolkit.

As a general rule, I consider it a bad sign when there's any HTML in the script at all, ever. Keep presentation and code separate. It makes things much easier, especially over time, and especially for someone else just picking up your code for the first time.

  • Comment on Re: CGI and writing html/javascript/css elegantly