This is a bit LISPy, but it will work:
chdir "/home/www"; opendir DIR, "."; my @third_level_dirs = ( # 3. This tests for their presence grep { -d } ( # 2. This adds /logs to the end map { "$_/logs" } ( # 1. this returns all directories but . & .. grep { !/^\.\.?$/ && -d } (readdir DIR) ) ) ); closedir DIR;
In reply to Re: How do I put all sub-directories into an array?
by mugwumpjism
in thread How do I put all sub-directories into an array?
by wylie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |