I think you'll find the problem is you're pushing a reference to %rec to your @DA each time, but you only have one instance of %rec, i.e. all your references point to the same thing.
So if you move the definition of %rec inside the loop it should do what you want.
So something like this
for (@buckets) { my %rec; ... push @DA,\%rec; }
In reply to Re: Pushing values into an array of hashes
by RichardK
in thread Pushing values into an array of hashes
by rizzler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |