Is there a cleaner way for File::Find to return a list of wanted files?
问题 I find the design choice behind File::Find::find a little surprising. The examples I've come across all show find used in void context. The documentation also clarifies that the \&wanted coderef in find( \&wanted, @dirs ) is not meant to be a filter (emphasis my own): The wanted() function does whatever verifications you want on each file and directory. Note that despite its name, the wanted() function is a generic callback function, and does not tell File::Find if a file is "wanted" or not.