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.