http://www.perlmonks.org?node_id=1175194


in reply to Interpolation of variables in stored HTML

Netwallah already mentioned HTML::Template. Template Toolkit and Template::Tiny are options as well.