in reply to Hash ref assignment to array results in anomaly
Then don't do that.
Maybe you could explain what you want to happen instead? If you want to create a new copy of $switch_optional every time you come around the loop, maybe reinitialize $switch_optional at the top of the loop instead of having it in scope for the whole function. If you just want to add it once, just add it once, instead of every time around the loop. Maybe you don't even want to use a hash, but simply add the switches to your list. It's hard to tell without you telling us.
Also consider whether it's really necessary to post a wall of code and add "HERE" markers. You could have spent some time reducing that code so that it still exhibits the problem, but is so small that you don't need any more HERE markers.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash ref assignment to array results in anomaly
by perlpal (Scribe) on Jul 24, 2009 at 12:11 UTC | |
by Corion (Patriarch) on Jul 24, 2009 at 12:22 UTC |