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


in reply to Reading from/writing to files with variables substitutions

So, you have a template and you want to process it? Template::Toolkit should be useful, if you don't mind changing your template syntax from $substitution to [% substitution %].
Sorry if my advice was wrong.