for(reverse (0 .. $#items)) { splice(@items, $_, 1) if ($items[$_] == 1 || $items[$_] == 3); }