There is a very usefule article on Perl.com – “FMTYEWTK About Mass Edits In Perl“. It is about making changes in a bunch of files using a simple Perl script, or a one-liner, or even straight from command line. All the information is old, but it is nicely collected in one single article, which can come handy pretty often.
FMTYEWTK stands for Fare More Than You Ever Wanted To Know, by the way.