in reply to Assign 2D-Arrays to a hash using a key
The magic is called "references." Go read or Google the perldocs on that concept. The value that gets stored in an array, a list, or a hash can be a scalar value of various kinds, or... it can be a reference, which therefore can refer to anything at all.