in reply to Re: how do i create a global var conditionally?
in thread how do i create a global var conditionally?
... the global you want to create ...
But be aware that my @globalarray; still declares a lexical variable: it is not visible to any code prior to the point of declaration, and it is not visible in any other source file in the application. If a lexical is declared very early in a source file (update: and if it's not declared in a block scope of any kind, i.e., if it's "in file scope") and if there is only one source file in the application, then a lexical can give a pretty darn good imitation of a global, but it's still a lexical.
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how do i create a global var conditionally?
by rizzo (Curate) on Mar 09, 2018 at 17:29 UTC |