File::List - Perl extension for crawling directory trees and compiling lists of files
use File::List; my $search = new File::List("/usr/local"); $search->show_empty_dirs(); # toggle include empty directories in output my @files = @{ $search->find("\.pl\$") }; # find all perl scripts in /usr/local
This module crawls the directory tree starting at the provided base directory and can return files (and/or directories if desired) matching a regular expression
The following methods are available in this module.
This creates a new File::List object and starts crawling the tree from this base
It takes a scalar base directory as an argument and returns an object reference
This method accepts a scalar regular expression to search for.
It returns a reference to an array containing the full path to files matching the expression (under this base).
This sets the debug level for find
Toggle display of empty directories
Toggle display of just directories
Dennis Opacki, dopacki@internap.com
perl(1).
To install File::List, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::List
CPAN shell
perl -MCPAN -e shell install File::List
For more information on module installation, please visit the detailed CPAN module installation guide.