Replacing $i++ with ++$i