#! perl use strict; use warnings; my %HoH = ( Flintstone => { Father => 'Fred', Mother => 'Wilma', }, Simpson => { Father => 'Homer', Mother => 'Marge', }, ); my %HoA = ( Flintstone => [ Father => 'Fred', Mother => 'Wilma', ], Simpson => [ Father => 'Homer', Mother => 'Marge', ], ); for my $family (sort keys %HoH) { print "$family: "; for my $role (keys %{ $HoH{$family} }) { print "$role=$HoH{$family}{$role} "; } print "\n"; print "$family: @{ $HoA{$family} }\n"; } #### 12:09 >perl 928_SoPW.pl Flintstone: Father=Fred Mother=Wilma Flintstone: Father Fred Mother Wilma Simpson: Father=Homer Mother=Marge Simpson: Father Homer Mother Marge 12:09 >