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

Hello Monks , can someone tell me if there is a perl script or free script that I can run in an environment then it will list all directories including the linked ones . Is there a way to see all direcotries in a machine with a script. thanks for any advice

Replies are listed 'Best First'.
Re: List Directories
by jgallagher (Pilgrim) on May 06, 2003 at 20:30 UTC
    Check out File::Find::Rule. From the top of the docs:
    use File::Find::Rule; # find all the subdirectories of a given directory my @subdirs = File::Find::Rule->directory->in( $directory );
Re: List Directories
by toma (Vicar) on May 07, 2003 at 07:29 UTC
    I've enjoyed using File::List. It follows symbolic links.
    use File::List; my $root= shift; my $search = new File::List($root); $search->show_only_dirs(); print "$_\n" for @{ $search->find() };
    It should work perfectly the first time! - toma