$^I = '.old'; @ARGV = ("header.h"); while (<>) { s/search/replace/; print; }