{ # new scope for local local *ARGV; @ARGV = '/path/test.c'; local $^I = ""; # -i command line switch while (<>) { s/(\@Filetyp\s*?:)/$1 c/; print; } }