Quote the docs:
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.
You need to use $file_short instead of $file, or you need to specify no_chdir => 1 in the options you pass to find/finddepth. Or you could use File::Find::Rule.
In reply to Re: unable to open files in dirs retrived by File::Find
by ikegami
in thread unable to open files in dirs retrived by File::Find
by kurreburre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |