http://www.perlmonks.org?node_id=826071


in reply to Re: How can I delete an element in a foreach cycle?
in thread How can I delete an element in a foreach cycle?

Or just go backwards...

for my $i ( reverse 0 .. $#ARGV ) { splice( @ARGV, $i, 1 ) if $ARGV[$i] eq 'hello'; }

www.jasonkohles.com
We're not surrounded, we're in a target-rich environment!