in reply to List Directories

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 );