in reply to these aren't locals, but they seem to act like it
The no strict should be the giveaway. When you do
you are accessing a global (i.e. package) variable named $flags, not a lexical variable. If you print out all the lexical variables explicitly, instead of trying to loop over them by name, you'll see that they are set as you expected.$name = 'flags'; print $$name;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: these aren't locals, but they seem to act like it
by argv (Pilgrim) on Mar 11, 2007 at 20:11 UTC | |
by bart (Canon) on Mar 12, 2007 at 11:43 UTC | |
by chromatic (Archbishop) on Mar 11, 2007 at 21:03 UTC | |
by Anonymous Monk on Mar 12, 2007 at 04:17 UTC | |
|
Re^2: these aren't locals, but they seem to act like it
by ysth (Canon) on Mar 12, 2007 at 23:47 UTC |