Skip navigation.
Home
Your source for Perl tips, howto's, faq and tutorials
( categories: )

Without saving a backup of the previous file:

perl -pi -e 's/foo/bar/g' file

Saving the original file as file.bak:

perl -pi.bak -e 's/foo/bar/g' file