I think your confusion comes from ignoring this part of the File::Find documentation:
Additionally, for each directory found, it will "chdir()" into that directory and continue the search, invoking the &wanted function on each file or subdirectory in the directory.
So the path in $f is always relative (because static is a relative path), and the calls to chdir that File::Find performs take care that the file tests never find the file that you think should be found.
Either pass the no_chdir => 1 option to &find, or do the file checks on $_ instead of $File::Find::name.
In reply to Re: Problem with -d inside find sub
by moritz
in thread Problem with -d inside find sub
by randian
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |