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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://384874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-03-28 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found