in reply to Templating suggestions for code generation

Take a look at the "Jeeves" code generator in my book, Advanced Perl Programming. The template syntax is similar to yours. (The code is freely available on the oreilly site) It might be worth your while to also study Terence Parr's StringTemplate , esp. the publications section. This template engine enforces strict separation between model and view, so there is no mixture of code and output text. --Sriram.