Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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.


Comment on Re: limiting scope of 'eval'??
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://384874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2015-04-02 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (56 votes), past polls