PerlOnTheWay has asked for the wisdom of the Perl Monks concerning the following question:
package A; package B; our $d = 1; package C; package D; print $d;
the above prints 1,but how does it work actually?
$d is not defined in package D, how can it be printed directly?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl syntax
by stevieb (Canon) on Mar 27, 2012 at 01:58 UTC | |
|
Re: Perl syntax
by chromatic (Archbishop) on Mar 27, 2012 at 01:46 UTC | |
|
Re: Perl syntax
by kcott (Archbishop) on Mar 27, 2012 at 02:00 UTC | |
|
Re: Perl syntax
by JavaFan (Canon) on Mar 27, 2012 at 09:19 UTC |