in reply to Print HoH

The ARRAY(0x1808dbc) should give you the clue that you are printing the value of the array reference (the array's address in the perl interpreter's memory space, if you will) rather than the array contents. You need to de-reference it using the @{ array-reference } syntax to get at the contents. Here's a simple example.

use strict; use warnings; my %HoH = ( fred => { age => 54, kids => [ qw{ janet john mary } ] }, pete => { age => 37, kids => [ qw{ anne tim } ] }, ); foreach my $person ( keys %HoH ) { print qq{Person: $person\n}, qq{ Age: $HoH{$person}->{age}\n}, qq{ Kids: @{ $HoH{$person}->{kids} }\n}, ; }

Which produces

Person: pete Age: 37 Kids: anne tim Person: fred Age: 54 Kids: janet john mary

I hope this helps you.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: Print HoH
by BioNrd (Monk) on Nov 09, 2007 at 16:19 UTC
    Sure does help. Thanks very much.