in reply to Foreach for array pruning?

splice @ary, $_, 1 for reverse grep ! $ary[$_] % 2, 0 .. $#ary;
splice @ary, $_, 1 for grep ! $ary[$_] % 2, 0 .. $#ary;

Drat. That'll screw up because all the indexes would be wrong.