I'm getting the following error in my code.  If I define $i as my $i
then everything works fine.  What's wrong?
 
# while1.pl
use strict ;
use warnings ;
 
$i = 1;
 
while ($i < 10) {
 print "I am at $i\n";
 i++;
}
# while1.pl
 
 
 
Global symbol "$i" requires explicit package name at
C:\BegPerl\while1.pl line 6

Reply via email to