in reply to How do I count all the files in all subdirectories?

I assume you are using some kind of UN*X.

Names are a thin layer on top of file system mechanism. Once you have a dirhandle open, one can change the names of the directory under you. This will not be a problem anymore.

use IO::Dir; my @dirhandle = map { IO::Dir->new($_) } @dirs;
Now you got the dirhandles and can work without fear of directory renaming. I am not sure that you mean that only the dirs are changing name under you. If files are renamed, their inodes identify them uniquely. You can get these inodes using stat().

-- stefp