note
AnomalousMonk
<p>
See also the [doc://perldsc|Data Structures Cookbook].
</P>
<blockquote><i>
I'm going to have to wrap my head around ...
</I></BLOCKQUOTE>
<p>
One way to go about that is to dump (see [mod://Data::Dumper]; see also [mod://Data::Dump]) the Perl object reference in stages, and from the inside out (i.e., top level to bottom): <br>
<c> print Dumper $obj->{'items'};</c> <br>
will show that you have a reference to an array. Then <br>
<c> print Dumper $obj->{'items'}->[1];</c> <br>
will show that one element of the array contains a hash reference. Finally, <br>
<c> print Dumper ${ $obj->{'items'}->[1] }{'name'};</c> <br>
will show the value of one key of the referent.
</P>
<p>
<b>Update:</B> BTW: the expression <br>
<c> ${ $obj->{'items'}->[1] }{'name'}</c> <br>
is equivalent to the more concise and IMHO preferable <br>
<c> $obj->{'items'}[1]{'name'}</c> <br>
</P>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-634253">
<hr><p>Give a man a fish<b>:</B> <c> <%-{-{-{-<</C></P>
</div></div>
651544
1141183