You can set up "arrays of hashes" or "hashes of arrays" or "anything of anything" because in every case the "thing" that is "in the (array or hash)" is either a "scalar" or "a reference." The magic bean here is, "a reference," because "a reference" can refer to anything. An array, a hash, or even for that matter another reference or a scalar. Very complex structures are built one brick at a time.