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?
or you can use sed (I know... you asked about perl):
sed
sed -i 's/find/replace/g'