in reply to Re: How do I put all sub-directories into an array?
in thread How do I put all sub-directories into an array?

Thanks for your help Aristotle.

Here's what I ended up with:

chdir "/home/www"; opendir DIR, "."; my @third_level_directories_only= ( grep { $_ ne '.' and $_ ne '..' and -d } (readdir DIR) ); closedir DIR;

This puts the names of all my third level directories (my virtual hosts) into any array.