in reply to Adding Hash to Hash of Hash?

Also, be sure to include: use strict; use warnings; in your code.   This will cause Perl to enforce many useful strictures that will help you to detect many common mistakes “at compile time.”

References are one of the key concepts in Perl (and many other languages).   You can put “anything” in “one spot” (or, if you like, “in several spots at once”) because what you are actually doing is putting “a reference to” whatever-it-is in that spot.   This enables you to create arbitrary data structures out of just a handful of simple building-blocks and to manage them efficiently.   But, yes, you need to thoughtfully and carefully read the various perldoc articles on the subject:   once you get a firm grasp of the concepts, it will become second nature.