Perl error --> Global symbol requires...
From: Bret Goodfellow (Bret.Goodfellow_at_questar.com)
Date: 02/25/05
- Next message: Brian Volk: "Send file to printer"
- Previous message: Chris Devers: "Re: Testing question"
- Next in thread: John W. Krahn: "Re: Perl error --> Global symbol requires..."
- Reply: John W. Krahn: "Re: Perl error --> Global symbol requires..."
- Reply: Owen: "Re: Perl error --> Global symbol requires..."
- Maybe reply: Xiaofang Zhou: "Re: Perl error --> Global symbol requires..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Feb 2005 15:55:21 -0700 To: <beginners@perl.org>
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
- Next message: Brian Volk: "Send file to printer"
- Previous message: Chris Devers: "Re: Testing question"
- Next in thread: John W. Krahn: "Re: Perl error --> Global symbol requires..."
- Reply: John W. Krahn: "Re: Perl error --> Global symbol requires..."
- Reply: Owen: "Re: Perl error --> Global symbol requires..."
- Maybe reply: Xiaofang Zhou: "Re: Perl error --> Global symbol requires..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|