in reply to Help creating/printing array of hashes
Hi Tom.
When working with complicated data structures, one of your best debugging friends is Data::Dumper (and related modules, your preference may vary). Print out a ref of your data structure to see if you understand how you're filling it.
use Data::Dumper; print Dumper(\@allmolecules);
Edit: You also might want to take a look into references, possibly in our tutorial section. Pushing an entire hash into an array makes sense in your head, but you want to push the reference to the hash to get the behavior you're expecting.
|
|---|