Others will give you the answer you're looking for. I'm here to recommend using
DBM::Deep for some of these structures.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?