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


in reply to variable interpretation while reading from a file

I think you would need to do an eval of some type on $_ to make that happen, and that is BAD NEWS(tm)! You'll probably need to do some sort of regex substitution instead to keep it relatively safe.

It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.

Replies are listed 'Best First'.
Re^2: variable interpretation while reading from a file
by amma (Novice) on Nov 29, 2013 at 11:35 UTC

    Regex method worked, thanks