in reply to Useless use in void context.

Get rid of the
, $i + 1
It serves no purpose.

        If your eyes hurt after you drink coffee, you have to take the spoon out of the cup.
              -Norm Crosby