in reply to How to search directory

Personally, I mostly use the unix command
grep -r pattern /path/to/directory
see the man page

In perl, take a look at File::Find