Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
and error is:use strict; # you must do declare vars before you use it. local $var; $var = "perl is"; print "$var";
what happen?Global symbol "$var" requires explicit package name at - line 3. Global symbol "$var" requires explicit package name at - line 4. Global symbol "$var" requires explicit package name at - line 5. Execution of - aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is local a declaration?
by rob_au (Abbot) on Apr 10, 2002 at 13:37 UTC | |
|
Re: Is local a declaration?
by broquaint (Abbot) on Apr 10, 2002 at 14:31 UTC | |
|
Re: Is local a declaration?
by dsb (Chaplain) on Apr 10, 2002 at 15:58 UTC | |
|
Re: Is local a declaration?
by talexb (Chancellor) on Apr 10, 2002 at 18:05 UTC | |
by rob_au (Abbot) on Apr 11, 2002 at 00:48 UTC | |
|
Re: Is local a declaration?
by helmex (Initiate) on Apr 10, 2002 at 14:22 UTC |