|
|
| No such thing as a small change | |
| PerlMonks |
Re^3: Search for a file created today and rename it by appending the current date and copy it to a different locationby afoken (Parson) |
| on Nov 27, 2012 at 05:11 UTC ( #1005790=note: print w/ replies, xml ) | Need Help?? |
|
File::Find traverses a directory tree and calls the wanted function for each directory entry found. Inside the wanted function, you can use lstat or stat or one of the -X functions to decide if you want to process that directory entry. Example:
File::Find comes with a script named find2perl. You invoke it like find, but instead of traversing directories, it writes perl code for performing the directory traversal using File::Find to STDOUT. The generated code is not pretty, may have some unused parts, but it generally works:
Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||