I usually do something like this:
find . -name \*.pm | xargs grep foo
With egrep or grep -E as necessary. With gnufind the . isn't required. And with gnugrep you can also do the following (crude) recursive grep:
grep -rs foo *
Lest filenames with spaces, newlines or other funky bits in them trip you, you might want to get into the habit of coupling find and xargs with their respective nullbyte-termination parameters (see manpages):
find . -name \*.pm -print0 | xargs -0 grep foo ____________ Makeshifts last the longest.