in reply to Read Perl files inside a directory and its subfolders
Look up File::Find. It is a great way to recurse down a list of directories. Typically you put the code to run on the found files in a sub and pass it a ref to this sub.
use File::Find; find(\&wanted, @directories_to_search); sub wanted { ... }
Cheers,
R.
|
|---|