in reply to Missing $ on loop variable at measurements2.pl line 69.
I think you'll find it's the:
construct (which you have two of.) You either want to move the move the my inside the brackets like:for my ($counter=0;$counter<9;$counter++)
Or even better use the more perl-ishfor (my $counter=0;$counter<9;$counter++)
foreach my $counter (0 .. 8)
/J\
|
|---|