in reply to Updating arrays within hashes

You are probably adding the same reference to both hashes, or two references to the same object.   Thus, changes to either one will affect the underlying target, which is the same in both cases.

(May we now have a show-of-hands of everyone who has done that before?   Let me finish typing this so I can stick my own hand into the air ...)