#!/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";
}
Fr Jul 30 13:54:24 CEST 2021
patent_button.gif valid-html401.png elektra.jpg fsfe-logo.png valid-css.png vim.gif anybrowser.gif