Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Re: creating dynamically named 'my' variables

by rob_au (Abbot)
on Mar 01, 2002 at 04:25 UTC ( [id://148475]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: creating dynamically named 'my' variables
in thread creating dynamically named 'my' variables

Hmmm, I'm not exactly sure what it is that you are trying to do but you may want to investigate the Safe module for the evaluation of supplied Perl code. This module allows you to evaluate Perl code in a contained compartment where restrictions can be imposed on allowed and disallowed operators - This can be very important where the code is derived from a potentially unsafe source.

 

perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'

  • Comment on Re: Re: Re: creating dynamically named 'my' variables

Replies are listed 'Best First'.
Re: Re: Re: Re: creating dynamically named 'my' variables
by ajwans (Scribe) on Mar 01, 2002 at 05:01 UTC
    Safe won't work, I specifically want the eval'ed code to be able to access the current namespace. The "users" in this case are other perl programmers here at my company so I'm not worried about malicious code being entered.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 18:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found