@ARGV = "file.tab"; $^I = ".bak"; while (<>) { s/foo/bar/; print; } [download]
In reply to Flocking and In-place editing by Anonymous Monk