in reply to Missing $ on loop variable at measurements2.pl line 69.

You need to bring the my inside the for statement for each offending line in order to declare the variable.

for my ($counter=0;$counter<9;$counter++)
needs to be
for (my $counter=0;$counter<9;$counter++)

Hope this helped,
-v.

"Perl. There is no substitute."