in reply to Accessing deeply burried arrays of hashes

$tophash{$value1}{$value2} = [$a, $b, $c, $d];
change this to:
$tophash->{$value1}{$value2} = [$a,$b,$c,$d];

This can be referenced with $tophash->{$value1}{$value2}[$index], however you'd like. Each value in $tophash->{$one}{$two} will be a reference to an array, in your print statement something like print $subsubkey->[0] would get you at $a

Enjoy

Trinary

Replies are listed 'Best First'.
Re: Re: Accessing deeply burried arrays of hashes
by merlyn (Sage) on Jan 25, 2001 at 04:07 UTC
    It makes very little difference here whether the top structure is a hash or a scalar containing a hashref. That's not where the problem was.

    -- Randal L. Schwartz, Perl hacker

Thanks!
by Mandor (Pilgrim) on Jan 25, 2001 at 04:24 UTC
    Thank you for all your answers, folks. They have helped me greatly.