http://www.perlmonks.org?node_id=347836


in reply to Re: Search & Replace in subdirectory files
in thread Search & Replace in subdirectory files

if your grep does recursion, you can even use it to find the files:
perl -i.bak -plwe 's/foo/bar/g' `grep -r -l foo .`