Bret Goodfellow wrote:
I'm getting the following error in my code.  If I define $i as my $i
then everything works fine.  What's wrong?

perldoc -q "When I tried to run my script, I got this message. What does it mean"


# 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

http://perl.plover.com/FAQs/Namespaces.html



John
--
use Perl;
program
fulfillment

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to