in reply to hash within an array within a hash
You have the following line in your script:
my $ownersRef = [ $owner1Ref, $owner2Ref ];
A two-element anonymous array is created, and $ownersRef is a reference to it. To get at the element 0 of this array, the arrow operator can be used to deference the array reference:
print $ownersRef->[0]
Output:
HASH(0x27ee58)
Element 0 in the anonymous array is a hash reference (and so is element 1). So, to get "Santa Claus" (sounds like a movie plot, doesn't it???!), another arrow operator can be used for dereferencing the hash reference:
print $ownersRef->[0]->{name}; ^ ^ | | | + hash key for "Santa Claus" | + array element 0
Output:
Santa Claus
|
|---|