push @moving, $val; next if $#moving < ($MOVES / 2); shift @moving if @moving >= $MOVES;