and it makes me feel dirty. Does anyone know a way to do this with a regular foreach (@array) type thingy?my @array = qw(0 1 2 3 4 5 6 7 8 9 ); for (my $i = 0; $i <= $#array; $i++) { #...process...process...# splice @array, $i, 1 if $array[$i] == 5; #Delete a certain array e +lement. }
Thanks,
Ira
"So... What do all these little arrows mean?"
~unknown
Edit: chipmunk 2001-06-20
In reply to Help me not use for($i=0;$i=$#array;$i++)...Please! by IraTarball
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |