in reply to will you explain what's going on?
update: this explanation is wrong - see chromatic post below.
The first time the if-condition is false, you are "autovivifying" a global variable "$namedisplay".
Whenever the if-condition is false again, the global variable will be in scope and the old value will show up.
You can catch this with "use strict;".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: will you explain what's going on?
by chromatic (Archbishop) on Oct 26, 2004 at 19:26 UTC | |
by dave_the_m (Monsignor) on Oct 26, 2004 at 23:52 UTC | |
by maard (Pilgrim) on Oct 27, 2004 at 10:29 UTC | |
by ysth (Canon) on Oct 27, 2004 at 12:06 UTC | |
by fglock (Vicar) on Oct 26, 2004 at 23:17 UTC | |
by maard (Pilgrim) on Oct 27, 2004 at 10:23 UTC | |
by ysth (Canon) on Oct 27, 2004 at 11:58 UTC |