So I'm writing a program to create pages from a database. In the past when
writing scripts like this I had the formatting for the pages built into the
program, this time I'm having the formatting in a separate template file. Now
the problem is how to replace strings like $variable in the template with the
value of the variable itself. Since I don't want to do a search-and-replace for
every possible variable, is there a simpler way to do this? (In the past I've
used <<HERE to interpolate when I set the variable, but I'd rather not have to
read through the template file more than once)
Why not use HTML::Template?
http://search.cpan.org/author/SAMTREGAR/HTML-Template-2.6/Template.pm
-Jeff Lowrey