⭐ in reply to How do I recursively process files through directories
use File::Find;
sub eachFile {
my $filename = $_;
my $fullpath = $File::Find::name;
#remember that File::Find changes your CWD,
#so you can call open with just $_
if (-e $filename) { print "$filename exists!\n"; }
}
find (\&eachFile, "mydir/");
|
|---|