Perl – Find and Replace script

The following Perl command is great for changing a string on multiple pages:
perl -i -pe 's/original text here/edited text here/g' *

For example:
perl -i -pe 's/red/blue/g' *

Leave a Reply

Your email address will not be published. Required fields are marked *

Shares