On Sun Aug 19 08:27:12 2012, jrw32982@yahoo.com wrote: > @x = ( (2)[0,1,2] ); > @y = ( (2)[� 1,2] ); > use Data::Dumper; > print Dumper \@x, \@y; > > produces: > > $VAR1 = [ > ��������� 2, > ��������� undef, > ��������� undef > ������� ]; > $VAR2 = []; > > This seems inconsistent.� The first result (for @x) was expected. The > second (for @y) wasn't. > I don't think it's particularly inconsistent. In the first case the slicing operation finds a defined element in the 0-index position of the RH and assigns it to the array on the LH, and then (I suppose) proceeds to auto-vivify. In the second case, the slicing operation finds no element in the 0-index position, has nothing to assign, and stops there. If anything, I think the second case is more intuitively plausible than the first. I couldn't find anything in Camel book 3rd or 4th edition that clarifies this definitively. Thank you very much. Jim Keenan --- via perlbug: queue: perl5 status: new https://rt.perl.org:443/rt3/Ticket/Display.html?id=114498Thread Previous | Thread Next