develooper Front page | perl.perl5.porters | Postings from October 2016

Re: (\@a) = \($x,$y) in non-void context

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
October 7, 2016 15:39
Subject:
Re: (\@a) = \($x,$y) in non-void context
Message ID:
20161007153914.14085.qmail@lists-nntp.develooper.com
Dave Mitchell wrote:
> In the current implementation the first two cases are equivalent;
> however, in the last (lval) case they differ; with this:
> 
>     \(@a) = \($a, $b);  \(@a) = \($c, $d);
> 
> @a[0,1] are left aliased to $c and $d, as you'd expect; with this:
> 
>     (\(@a) = \($a, $b)) = \($c, $d);
> 
> @a[0,1] are left aliased to $a and $b.

I would consider that a bug.


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