in reply to I love perl but....

Another interesting alternative is HTML::Tree. There's an old version on CPAN, but I don't know why the author doesn't put the new version there. It's a module that allows you to create templates kind of like HTML::Template except that the template is 100% valid HTML, thereby completely separating your code and presentation.

Update: Hero Zzyzzx is right, HTML::Template could be made valid HTML, but then your template is even uglier than before. And viewing the file in a browser, you have blank areas where data would go (unless you actually run the 'program'), whereas with HTML::Tree you can view real sample data (in a WYSIWYG sort of way).

Replies are listed 'Best First'.
Re: Re: I love perl but....
by Hero Zzyzzx (Curate) on May 22, 2001 at 20:07 UTC

    Not to be nitpicky, but you can have 100% valid HTML with HTML::Template too. You can embed the variables, if-thens, and loops in HTML comments. You can then run the HTML through a validator, if you desire.