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
- Re: Perl error --> Global symbol requires... Bret Goodfellow
- Re: Perl error --> Global symbol requires... John W. Krahn
- Re: Perl error --> Global symbol requires... Owen
- Re: Perl error --> Global symbol requires... John W. Krahn
- Re: Perl error --> Global symbol requires... JupiterHost.Net
- Re: Perl error --> Global symbol requires... Xiaofang Zhou