develooper Front page | perl.perl5.porters | Postings from February 2003

Re: [perl #21321] local ${"FOO"} does not work

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
February 21, 2003 01:15
Subject:
Re: [perl #21321] local ${"FOO"} does not work
Message ID:
20030221101531.6f3d80cf.rgarciasuarez@free.fr
A.Bergman <sky@nanisky.com> wrote:
> 
> On fredag, feb 21, 2003, at 00:05 Europe/Stockholm, Ronald J Kimball 
> wrote:
> 
> >
> > Lexical variables do not live in the symbol table, so they cannot be
> > accessed through symbolic references.
> >
> > Ronald
> 
> Whilst it true that they do not live in the symbol table, I doubt that 
> is the reason they can't be accessed through symbolic references since 
> perl wouldn't have much trouble looking up a lexical by name.

That's documented that way, apparently since 5.001, so I'd call this a
feature.

Time to verify if there's a regression test for this :

$foo = 1; my $foo = 2;
print ${foo}," ",${'foo'},"\n";

--> prints "2 1".

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About