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


in reply to limiting scope of 'eval'??

You appear to want no interpolation of $a. This is easily done with backticks:

$a = "VAR_A"; $b = 'print \'VAR_B (\$a)\\n\''; eval $b;

SciDude
The first dog barks... all other dogs bark at the first dog.