Jul 5, 2000, 11:36 AM
Post #2 of 2
If you're doing this from the callback you passed to find() or finddepth(), then try using $_ instead of $File::Find::name.
You might have to read between the lines of the pod in File::Find.pm to see why this is so, but it has to do with $File::Find::dir being prepended to $File::File::name and being chdir'd to $File::Find::dir when the callback is invoked. If you start the find from a relative path, then $File::Find::name might be fine for pretty-printing, but it's useless for stat.