in reply to search directory for files with string
If you want a perl solution File::Find::Rule has a grep method that will search files for a pattern.