my $files = "D:\\Documents and Settings\\All Users\\Application Data\\cmd-op928.output"; { local ($^I, @ARGV) = ('.bak', $files); while (<>) { if ($. == 1) { print "\n"; } else { print; } } }