Usage of 'my' in 'eval'by Anonymous Monk
|on Jan 06, 2006 at 11:35 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
Is my understanding of eval correct as to after having eval'd some perl code introducing my variables, they go out of scope directly afterwards?
What I mean written in code:
I'm trying to export lexically scoped (i.e. my variables) via eval which haven't been and are not to be defined in the code scope before.
Global scoped variables are not of any help to me, nor local variables to be defined in forehand; what I want are lexically scoped variables in the lexical scope I execute eval in.
Is there any way to do this (WITHOUT having to define them before executing eval)?
Thank very much for any help!