Perl script to find and replace Posted by admin | Apr 14, 2012 | Linux, Technology-Howto | 0 | A find and replace script using perl perl -pi -e 's/find/replace/g' *.txt Or, to change matching files in a hierarchy: find . -name '*.txt' |xargs perl -pi -e 's/find/replace/g'