On 27 June 2013 03:59, Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote: > > Perl 5's references are fine, but sometimes dereferencing them is not. We end > up switching between postfix and circumfix syntax to dereference structures. > > push @{ $x->{foo}->[0]->m }, $y; > > Blech. > > In 5.14, an experimental feature was added to avoid this in some contexts: > > push $x->{foo}->[0]->m , $y; > > In other contexts, it (obviously) can't help: > > push @y, @{ $x->{foo}->[0]->m }; > > subroutine( @{ $x->{foo}->[0]->m } ) I'm not convinced this is a problem we should solve (on the other hand I'm not convinced it is not.) I would consider this code bug-prone and probably in maintenance mode rewrite it as: my $array= $x->{foo}->[0]->m; push @y, @$array if $array; Raphael raises similar points. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next