If you decide to use splice, either go through the array backwards, or do not increment your index counter when you delete an array item, or you'll skip one in your test.
grep would be easier:
@filtered = grep { $_ != 0 } @l;
In reply to Re: simple array question
by bart
in thread simple array question
by Anaximander
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |