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

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

Thread Previous | Thread Next
Enache Adrian
February 20, 2003 14:51
Re: [perl #21321] local ${"FOO"} does not work
Message ID:
On Thu, Feb 20, 2003 at 07:28:47PM -0000, Jarkko Hietaniemi wrote:
> But I still fail to see a reference in there.  To be honest, I had
> originally something more that "FOO" in between the {}, I had "\cFOO".
> But still completely compiletime, nothing naughty like "FOO$BAR".

${"FOO"} a symbolic reference, and that's at compile-time that perl barfs.
(in Perl_mod() - op.c)

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 ?


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About