Upon further reflection, your code shouldn't break even
if that line had been deleted. It just looks wrong. My bad.
At this point it might help if we saw @data and @data2.
I have a sneaking suspicion that your program is
actually behaving correctly.
In the meantime, you wanted to know how to access
$name and $ref? As near as I can tell, for each
entry $n < $num you can use these:
$keyhash{$id}{MANY}[$n][0] # $name
$keyhash{$id}{MANY}[$n][1] # $ref
Maybe this will help you debug your very very strange
data structure...
buckaduck |