sub kategorie_liste_holen { my $cat = shift; my @sub_categories_to_print; foreach my $category (grep { /^$cat:/; } @categories) { if ($category =~ /^($cat:[^:]+):/) { $category = $1; } push (@sub_categories_to_print, $category) unless $sub_categories_to_print[$#sub_categories_to_print] eq $category; } return @sub_categories_to_print; }