in reply to Re: Yet More fun With Array Indices
in thread Yet More fun With Array Indices

Since Elgon's original code appeared to be doing numeric tests, it's worth pointing out that grep will work with numeric operations as well as string matches. For instance:
@a=(1,2,3,4,5); @b=grep {int($_/2) == 1} @a; print join $/,@b,"";
prints out the values 2 and 3.