grep { !/^\.\.?$/ && -d }Careful: a directory called ..\n would fall through the cracks using $ as "end of string" match. You want grep { !/\A\.\.?\z/ && -d } But we don't have to use a regex for everything. grep { $_ ne '.' and $_ ne '..' and -d } ____________
In reply to Re^2: How do I put all sub-directories into an array?
by Aristotle
in thread How do I put all sub-directories into an array?
by wylie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |