Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: limiting scope of 'eval'??

by SciDude (Friar)
on Aug 22, 2004 at 03:18 UTC ( #384874=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://384874]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2016-12-11 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (168 votes). Check out past polls.