in reply to Subtleties of files and directories

-e (and -d) will be true for directories but -f won't (yes, for all operating systems).

Reading the actual code of sub rmtree in File::Path shows that if it is passed something that isn't a directory and the third argument to rmtree() is false, then it tries hard to delete it.

        - tye (but my friends call me "Tye")