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