Since some of the variables that you're taking references to within the loops were declared outside the loops, they never fall out of scope from iteration to iteration. Hense, for those variables, you're dealing with the same memory location, same variable each time you take a reference to it while constructing your datastructure.
You should either redesign your lexical scoping so that you get a new variable on each iteration, or (easier) you should change all \@varname to [ @varname ], and all \%varname to { %varname }.
The anonymous array constructor, and the anonymous hash constructor will create entirely new anon arrays / anon hashes, instead of reusing the same ones. You might have a look at perlreftut and perlref for info on these constructors.
Dave
In reply to Re: Arrary of Hashes populating issue
by davido
in thread Arrary of Hashes populating issue
by SmokeyB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |