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

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

Thread Previous | Thread Next
From:
Ronald J Kimball
Date:
February 20, 2003 15:06
Subject:
Re: [perl #21321] local ${"FOO"} does not work
Message ID:
20030220230558.GB622868@linguist.thayer.dartmouth.edu
On Fri, Feb 21, 2003 at 12:51:31AM +0200, Enache Adrian wrote:
> BTW ( of symbolic refs) , I stumbled on this when fixing the
> braces & interpolation problem:
> 
> $ perl -le 'my $b=1; $a = "b"; print $$a'
> $
> 
> leaving the 'my' out gets the expected behaviour.
> 
> I rarely used symbolic references in Perl - Is this a bug or a feature ?

Lexical variables do not live in the symbol table, so they cannot be
accessed through symbolic references.

Ronald

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