I simply wanna read in a logfile, do a search and replace, and then write out the changes to that same logfile.
What\'s the best practice way of doing this in Perl?
I normally code up a one liner for this:
perl -i -pe 's/some/thing/' log.file
See Here