@ARGV = "file.tab"; $^I = ".bak"; while (<>) { s/foo/bar/; print; }