use File::Find ;
use Cwd ;
my $currentWorkingDir = getcwd;
my @filesToRun = ();
my $filePattern = '*.log' ;
#add only files of type filePattern recursively from the $currentWorkingDir
find( sub { push @filesToRun, $File::Find::name
if ( m/^(.*)$filePattern$/ ) }, $currentWorkingDir) ;
foreach my $file ( @filesToRun )
{
print "$file\n" ;
}
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!