in reply to Re^2: Using an "outer" lexical in a sub?
in thread Using an "outer" lexical in a sub?
Letting me refer to $main::n as just plain $n.
Or $Whatever::The::Current::Package::Is::n ofcourse :-)
our() is a fairly recent introduction addition to perl. In the olden days, you'd have to use vars, which just switches off strict 'vars' for specific variables.
For additional fun and confusion see local.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Using an "outer" lexical in a sub?
by tilly (Archbishop) on Nov 01, 2006 at 23:36 UTC | |
by Joost (Canon) on Nov 01, 2006 at 23:49 UTC | |
by tilly (Archbishop) on Nov 02, 2006 at 00:09 UTC | |
by Joost (Canon) on Nov 02, 2006 at 01:26 UTC | |
by tilly (Archbishop) on Nov 02, 2006 at 03:06 UTC |