On Thu, Nov 15, 2001 at 03:03:17PM -0500, Andrew Stanley wrote:
> > 
> > It seems to be that using a lexically scoped $arg1 causes the
> > symbolic reference to fail.  That doesn't make a lot of sense to
> > me, though.
> > 
> > Perl 5.6.1, BTW.
> > 
> > (darren)
> 
> 
> IIRC, it's the fact that the lexical scoping happens at run time -- the
> symbolic ref happens at compile time, which happens before run time -- so
> I can't access the variable.  The use vars things works -- correct, since
> the globals aren't lexically scoped.  All that said, I wish I could do
> something similar to /ee -- but something tells me it might not work.

That's backwards.  Lexical variables are declared at compile time; symbolic
references are evaluated at run time.  It would not be possible for a
symbolic reference to be evaluated at compile time, because the variable
doesn't have a value yet!

Symbolic references can't access lexical variables because lexical
variables are not in the symbol table.  This is explained in perlref, under
the section Symbolic References.


Ronald

Reply via email to