in reply to Re^4: array of hash
in thread array of hash
push @currArr, %currHash;
This line does not insert a hash into an array. It flattens the hash to a list to be inserted. Use Data::Dumper to visualize the resulting structures. What structure do you exactly want to build? If you want to create a copy of a shallow hash, use
push @currArr, { %currHash };
To create a deep copy, see Clone or Storable.
|
|---|