in reply to
Does File::Find always visit files before subdirs?
I would not make that assumption. The "correct" behavior of your program should not be a side-effect: your code should be such that it compels the right behavior to occur, and such that it is abundantly clear what the right behavior is supposed to be. If you need to find directories first, then go find only-directories first. Then, go find files ignoring directories. If the module says that the behavior you are looking for is or can be guaranteed, explicitly mention that guarantee in your source-code, and if an option controls it, explicitly set that option even if it's currently the default. Packages do change their behavior sometimes. Sometimes by design; sometimes because they never promised you a rose-garden in the first place.