Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2017-11-17 22:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (274 votes). Check out past polls.

    Notices?