in reply to Re (tilly) 1: References
in thread References
Is almost what I want, but it will not work under strict, as you point out.sub a1 { local *c = shift; $c{a} = 'a'; }
However this will declare %d globally, which is not what I want. so:sub f { use vars qw(%d); local *d = shift; $d{f}='f'; }
But since I dont know how our works, I dont know how this works... Can someone explain?sub f { our %d; local *d = shift; $d{f}='f'; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 3: References
by tilly (Archbishop) on Aug 19, 2001 at 21:44 UTC | |
by Cine (Friar) on Aug 20, 2001 at 10:28 UTC | |
by tilly (Archbishop) on Aug 20, 2001 at 15:58 UTC | |
by dragonchild (Archbishop) on Aug 20, 2001 at 16:35 UTC | |
by Cine (Friar) on Aug 20, 2001 at 17:46 UTC | |
by dragonchild (Archbishop) on Aug 20, 2001 at 18:09 UTC | |
|