Perl-Sensitive Sunglasses | |
PerlMonks |
Re: perl doesn't like variableby Dietz (Curate) |
on Oct 03, 2004 at 14:12 UTC ( [id://396010]=note: print w/replies, xml ) | Need Help?? |
Under use strict, your $counter is initialized before it is declared:
So you have to declare it (outside of while(<INPUT>)):
Note, that you don't need use vars qw($counter); afterwards. Otherwise you would declare just another variable called $counter living in the symbol table:
In Section
Seekers of Perl Wisdom
|
|