my %hash; for my $name ( qw(nummern tests) ){ $hash{$name} = [ "1. $name", "2. $name" ]; } my @nummern = @{ $hash{nummern} }; print "@nummern";