Yitzchak Scott-Thoennes wrote in perl.fwp :
>>
>> sub getaglob {*foo}
>> $foo = "pong\n";
>> { local ${&getaglob} = "ping "; print $foo }
>> print $foo;
>>
>> fails with "Can't localize through a reference"!
>
> This error seems to be removed in 5.8.1 and it works there (though the
> error entry was erroneously left in perldiag).
perldiag is still correct, because this error was only removed in some
cases. Perl 5.8.1 allows localization through a symbolic reference, but
not a hard one :
$ bleadperl -le '$x="a";local $$x=2;print$a,$$x'
22
$ bleadperl -le '$x=\"a";local $$x=2;print$$x'
Can't localize through a reference at -e line 1.
--
If strain on the lexer were a design criterion, I blew it long ago.
-- Larry Wall