in reply to Useless use of private variable in void context

The first "$i" in the for loop causes the warning. "$i" at that point is a statement that does nothing and the resultant value is not used by anyone (normally an assignment occurs there) and hence the "useless use" warning.

This program will generate the same warning:

#!/usr/bin/perl use strict; use warnings; my $y = 9; $y; exit 0;
Change the for loop to
for(;$i<$Size;$i++) {
and the warning will go away.