I need to find and replace a word in all the files across a directory and its subdirectories.
I used this line of code:
perl -pi -w -e 's/foo/bar/g;' *.*
But it changes the words only in files in the current directory and doesn't affect the subdirectories.
How can I change the word on every directory and subdirectory?