How to replace a string in an existing file in Perl
Use a one-liner: Explanation -p processes, then prints <> line by line -i activates in-place editing. Files are backed up using the .bak extension The regex substitution acts on the implicit variable, which are the contents of the file, line-by-line