local @ARGV = $path; local $^I = ""; while ( <> ) { s/foo/bar/g; print; }