Keep It Simple, Stupid | |
PerlMonks |
Re: How do I recursively process files through directoriesby nate (Monk) |
on Dec 23, 1999 at 03:44 UTC ( [id://1317]=note: print w/replies, xml ) | Need Help?? |
Here's a bit of example code that I often use: 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/");
In Section
Seekers of Perl Wisdom
|
|