note
hdb
<p>
The line
</p>
<code>
foreach my $rt ( @{$first{$fr}{$tg}{$ab}}){
</code>
<p>tells that <c>$first{$fr}{$tg}{$ab}</c> is a reference to an array.</p>
<p>In the line</p>
<c>my $val = $first{$fr}{$tg}{$ab}{$rt} ;</c>
<p>you use it as if it were a reference to a hash. That's what the problem is.</p>
<p>If you remove that line and change the one after to</p>
<c>print " print $fr, $tg, $ab, $rt;"</c>
<p>you will probably get what you want. (I cannot test as you have not provided runnable code nor data.) </p>
1091079
1091079