my $root_path = 'absoluter Pfad zum Startverzeichnis'; my $start_dir = 'Startverzeichnis'; opendir THEDIR, "$root_path/$start_dir" or die $!; readdir THEDIR for 0 .. 1; @dirs = grep -d "$root_path/$start_dir/$_", readdir THEDIR; closedir THEDIR; print($_, "\n") foreach @dirs;