in reply to Deleting specific element in array in FOREACH loop

If I interpret foreach correctly (the part where it says "If any part of LIST is an array, foreach will get very confused if you add or remove elements within the loop body, for example with splice. So don't do that."), deleting elements of an array used in a foreach statement as done in the example

foreach my $element ( @array ) {
is fraught with peril.

emc

At that time [1909] the chief engineer was almost always the chief test pilot as well. That had the fortunate result of eliminating poor engineering early in aviation.

—Igor Sikorsky, reported in AOPA Pilot magazine February 2003.