#!/usr/bin/perl %HoA = ( flintstones => [ "fred", "barney" ], jetsons => [ "george", "jane", "elroy" ], simpsons => [ "homer", "marge", "bart" ], ); #weiteres Array hinzufügen: $HoA {teletubbies} = [ "tinky winky", "dipsy", "lala", "po" ]; #Elemente an existierendes Array anfügen: push @{$HoA {simpsons} } , "lisa", "maggie"; #Einlesen von weiteren Arrays: print "Arrays eingeben (Key= value1 value2 value3 ...)"; while (<>) { next unless s/^(.*?)=\s*//; $HoA {$1} = [ split ]; } #Alles ausgeben: for $family (keys %HoA) { print "$family: @{ $HoA{$family} }\n"; }