You can try the Template Toolkit .
Here is an excerpt from the Template Toolkit Introduction, manual page :
Template Toolkit is a set of Perl modules that implement a fast, flexible, powerful, and extensible template processing system. It is most often used to create dynamic web content, although it can be used equally well for processing any text documents.
At the simplest level, it provides an easy way to process template files by filling in the built-in variable references with their equivalent values. Here is an example template.
Dear [% name%],
It has come to our attention that your account is in
arrears to the sum of [% debt%].
Please settle your account before [% deadline%] or we
will be forced to revoke your license to Thrill.
The management.
By default, template directives are embedded in the sequence of characters [% ... %] , but you can change them and various other parameters to customize how the Template Toolkit looks, feels and works. You can set the INTERPOLATE parameter, for example, if you prefer to embed your variables in the Perl style:
Dear $ name,
It has come to our attention that your account is in
arrears to the sum of $ debt.
Perldoc Page
source share