gmpassos has asked for the wisdom of the Perl Monks concerning the following question:
I know that our() can be used, but this is only for the same scope. I want to make exactly what happens with %ENV, %INC and @INC.
I have tried to make this changing the Perl source, in the file gv.c, and works fine, but this isn't portable, since Perl binarys need to be recompiled.
For who want to make some tests, here are the changes inside gv.c that I made, this start in the line 712 (Perl-5.8.0), my new global variable is %HWX:
else if (*name == 'H' && strEQ(name, "HWX")) global = TRUE;
Graciliano M. P.
"The creativity is the expression of the liberty".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to make global variable, like %ENV
by broquaint (Abbot) on Oct 07, 2002 at 16:06 UTC | |
|
Re: How to make global variable, like %ENV
by BrowserUk (Patriarch) on Oct 07, 2002 at 16:06 UTC | |
by gmpassos (Priest) on Oct 07, 2002 at 17:17 UTC | |
|
Re: How to make global variable, like %ENV
by Aristotle (Chancellor) on Oct 09, 2002 at 19:10 UTC | |
by gmpassos (Priest) on Oct 10, 2002 at 17:52 UTC |