Of note:
Text::Template does exactly this: You hand it a template and a hashful of values, and it interpolates 'em in. Handy for a quick and dirty, small templating job, but anything more than a few lines in a couple files, and I'd prefer
Template::Toolkit.