On 7/12/07, Gregory Machin <[EMAIL PROTECTED]> wrote:
Hi
I have a rusty memory of perl have the ability, where by you can load
perl code into an variable / array then execute it on demand, anyone
got an example of how to do this ..
Many Thanks
The string based version eval function can do this, but it is very
dangerous (for one thing, you open yourself up to injection attacks*)
and it is very rarely really needed. If you describe what you want to
achieve we may be able to tell you how to achieve the effect without
eval.
* http://en.wikipedia.org/wiki/Code_injection
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/