in reply to Re^7: the "our" declaration ?!!
in thread the "our" declaration ?!!
You are right that the specific code example I gave only works for $_. But some variant of the trap works on any global variable that is normally assumed to be in package main no matter what package you are in. Like @_, %ENV, or %SIG.
In any case this is an example of why it is better to have a precise understanding of how features work rather than having a vague impression that is going to mostly work, most of the time.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: the "our" declaration ?!! (special vars)
by LanX (Saint) on Jan 21, 2009 at 12:24 UTC | |
by tilly (Archbishop) on Jan 21, 2009 at 16:20 UTC | |
by LanX (Saint) on Jan 21, 2009 at 16:49 UTC | |
by tilly (Archbishop) on Jan 21, 2009 at 17:41 UTC | |
by LanX (Saint) on Jan 21, 2009 at 20:50 UTC | |
| |
by Sandy (Curate) on Jan 21, 2009 at 20:56 UTC | |
| |
by Jenda (Abbot) on Jan 21, 2009 at 23:27 UTC | |
|