in reply to Templates on the cheap?

Assuming your variable names are well-formed, this is one possibility: s/\$(\w+)/"\$$1"/gee; A preferable solution (that was suggested recently in another thread) is to use a hash instead of named variables:
$vals{maintainer} = 'root@god.com'; s/\$(\w+)/$vals{$1}/g;
I would lean towards using one of the Template modules, though, for robustness.