in reply to How to search recursively and return specific patterns

Have a look at the standard module File::Find