or download this
How can I use Perl's "-i" option from within a program?
...
# $^I and @ARGV return to their old values here
This block modifies all the ".c" files in the current directory
+, leaving a backup of the original data from each file in a new ".c.o
+rig" file.