{ local $^I = ''; # -i local @ARGV = $fileName; while (<>) { s/foo/bar/g; print; } }