- No need for the / after the .
- You forgot to put a \ in front of *
If you don't put it there your find will fail as soon as you have *.txt files in the current directory because the shell will replace "*.txt" by a list of those files.
So:
perl -pi -w -e 's/find/replace/g' `find . -name \*.txt`
OTOH: I prefer to use xargs for situations like this, just because the command line usually has limits.
find . -name \*.txt -print0 | xargs -0 perl -pi -w -e 's/find/replace/
+g'
$\=~s;s*.*;q^|D9JYJ^^qq^\//\\\///^;ex;print