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

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

Thread Previous | Thread Next
Father Chrysostomos
October 7, 2016 15:39
Re: (\@a) = \($x,$y) in non-void context
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About