File::Find automatically chdirs into the different directories, so your routine simplifies to
It's also helpful that the filetest operators default to $_ and that the special filehandle _ can be used to save a system call. This works fine also for directory names with spaces in them.sub TEST_FOR_AGE { print "$File::Find::name\n"; if (-f && (-M _ >= 30)) { print FOO "$File::Find::name\n"; } }
-- Hofmator
In reply to Re: Win32 & File::Find
by Hofmator
in thread Win32 & File::Find
by BigJoe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |