|laziness, impatience, and hubris|
Reading from/writing to files with variables substitutionsby Qukz (Novice)
|on Mar 28, 2013 at 07:26 UTC||Need Help??|
Qukz has asked for the
wisdom of the Perl Monks concerning the following question:
I have some boilerplate text files with some variables I'd like to substitute. I'd then like to create new files with the appropriate substitutions based on those; for example (one of the boilerplate text files):
How would I go about using those files to create new files with the substituted values, so the new file would then be
The following works
But I can't figure out how to do the above while keeping the boilerplate text files seperate from the script itself and still printing the substituted variables rather than the literal names of the variables.
Any help would be greatly appreciated.