> My inclination would be to write a one-off program from scratch in
> Perl or Java. I just don't think it'll be worth the effort of
> generalized tools.
Actually I've often done this even more banally than that. Load the
file into the editor, and start making the needed changes by hand
(using the editor's global find-and-replace feature), and when I
notice something that's automatable, write a quick key macro, editor
macro, or on rare occasion Perl script to do it.
(In order to prevent repetition, need to concatonate all the involved
files into one before starting -- this method does not work well for
a very large number of small files or any number of huge files.)