in reply to How do I completely remove an element from an array?

I know this is old, but I stumbled across it and wanted to add that given the example, you could use the redo operator. Note incrementing the loop cursor ($value++) and then the redo;
my @items = ( 0..5 ); my $index = 0; for my $value (@items) { print "testing $value\n"; if ( $value == 1 or $value == 3 ) { print "removed value $value\n"; splice @items, $index, 1; $value++; redo; } $index++; }

Originally posted as a Categorized Answer.