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

Re: Future Perl development

From:
Rafael Garcia-Suarez
Date:
February 8, 2007 01:02
Subject:
Re: Future Perl development
Message ID:
b77c1dce0702080102u5ca5619dm65d06b74ae503354@mail.gmail.com
On 07/02/07, Peter Scott <Peter@psdt.com> wrote:
> in Tk::Trace::store().  The construct $#{@$ref} is evaluated
> differently in perl5.8.8 and your snapshot:
>
> $ perl5.8.8 -le '$x = [3..5]; print $#{@$x}'
> 2
>
> $ perl-30145 -le '$x = [3..5]; print $#{@$x}'
> -1
>
>
> The more conventional construct $#$ref is evaluated
> identically.  $#{@$ref} seems like it ought to be illegal, but clearly
> hasn't been hitherto, and I couldn't find anything in your changelog
> saying it had now been outlawed.  Case referred to department of
> backward compatibility.

It's illegal with use strict refs. (at least in blead)



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