Win has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Returning sub directories
by marto (Cardinal) on Nov 10, 2009 at 15:49 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Returning sub directories
by kennethk (Abbot) on Nov 10, 2009 at 15:44 UTC
    What have you tried that didn't work? (a), (b), and (c) can be quite simply accomplished in one line using readdir, -d and grep. This can then be fed into a foreach loop.

    If you don't want to code that much and don't actually care about what your subdirectories are, you can do something similar with File::Find.

Re: Returning sub directories
by keszler (Priest) on Nov 10, 2009 at 15:44 UTC