<?xml version="1.0" encoding="windows-1252"?>
<node id="984149" title="Re: Hash of a nArray and all that comes with it." created="2012-07-28 01:43:11" updated="2012-07-28 01:43:11">
<type id="11">
note</type>
<author id="616540">
moritz</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;code&gt;
%entry = {$item_id=&gt;\@data, $item_id=&gt;\@data.....etc}
&lt;/code&gt;&lt;/blockquote&gt;

&lt;p&gt;I hope that's not what you're doing, because that assigns a hash reference to a hash without dereferencing.

&lt;blockquote&gt;As long as I give an explicit value for $j's range, the output is fine. But I cannot figure out how to access the arraysize for &lt;c&gt;$entry[$i]&lt;/c&gt;&lt;/blockquote&gt;

&lt;code&gt;
my $len = scalar @{ $entry{$key}[$i]  }
&lt;/code&gt;

&lt;p&gt;gives you the length of the &lt;c&gt;$i&lt;/c&gt; array stored at &lt;c&gt;$key&lt;/c&gt;.

&lt;p&gt;And I think you're missing the part of your code where you assign to &lt;c&gt;@entry&lt;/c&gt;, I can't see how you'll get any output like this. &lt;c&gt;@entry = @{ $entry{$key} }&lt;/c&gt; should fix it.

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-616540"&gt;
[http://perl6.org/|Perl 6 - the future is here, just unevenly distributed]
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
984147</field>
<field name="parent_node">
984147</field>
</data>
</node>
