One or more of the elements of the array @positions is undefined. The easiest way to check this is like this:
use Data::Dump qw(pp); pp([@positions]);
This will give you a printout of the value of each element in array @positions. I expect we will see that some are "undef" meaning undefined. It will be these elements that are causing the problem.
In reply to Re^7: filtering an array
by philiprbrenan
in thread filtering an array
by prbndr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |