On Thu Apr 17 09:32:26 2014, anno5@me.com wrote: > I noticed that "delete @x[@y]" can go wrong in the special case when > @x and @y are identical. Example: > > use warnings; > my @array = (2, 1, 2); > delete @array[@array]; # deleting from itself > say "(@array)"; > > > The response is > Use of uninitialized value in delete at ./ttt line 11. > () > > The warning is unexpected and the resulting array ought to still have > 2 on index position 0. Indeed, "delete @array[my @dup = @array]" shows > the expected behavior. I think this also is the expected behavior: ##### my @array = (2, 1, 2); my @second_array = (2, 1, 2); delete @array[@second_array]; say "(@array)"; ##### Output: (2) ##### --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=121677Thread Previous