http://qs321.pair.com?node_id=930142


in reply to Re^2: Variable interpolation in a file to be read in
in thread Variable interpolation in a file to be read in

"...read in a file that contains text and some perl variables."
Just don't do that. :-) Use a template system e.g. HTML::Template*. That is, imo, the best way to go for that part of your problem.

But it still leaves you with the next problem you'll have and which experienced monks are warning you about: quoting SQL properly. For that, placeholders are the way to go.

* Don't worry about the HTML part of the name, it is, again imo, a handy templating system. Of course there are many others. It is just one that I am very familiar with.

  • Comment on Re^3: Variable interpolation in a file to be read in