if ($delrec) { local $^I = ".keep"; @ARGV = qw(filename); while (<>) { do stuff } }