If you're interested in a "fast" way, you may also want to at least give a glance to the -pi switch for calling the interpeter. Without giving away the plot, this will let you (if properly called ;) ) edit a series of files in place and create backups as you go. Sorta. (wiser monks will disagree on my verbage here, I'm sure).
"I have never written bad code. There are merely unanticipated features."