in reply to Re^4: Multiple uses of (?{ code }) do not appear to be called
in thread Multiple uses of (?{ code }) do not appear to be called
local our @o;
is the same as
our @o;
local @o;
our @o; disables use strict for @o.
local @o; protects the existing value of @o (and initialized @o to an empty array).
Without the local, there's no scoping. That's bad! If the caller also uses @o, you just clobbered the caller's variable.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Multiple uses of (?{ code }) do not appear to be called
by rhesa (Vicar) on Dec 29, 2006 at 19:58 UTC | |
by ikegami (Patriarch) on Dec 29, 2006 at 20:20 UTC |