--- code/trunk/maintain/Detrail 2007/03/05 12:36:47 97 +++ code/trunk/Detrail 2007/03/08 16:53:09 111 @@ -6,26 +6,26 @@ # This subroutine does the work for one file. sub detrail { -my($file) = $_[0]; -my($changed) = 0; +my($file) = $_[0]; +my($changed) = 0; open(IN, "$file") || die "Can't open $file for input"; @lines = ; close(IN); -foreach (@lines) - { - if (/\s+\n$/) - { - s/\s+\n$/\n/; +foreach (@lines) + { + if (/\s+\n$/) + { + s/\s+\n$/\n/; $changed = 1; - } + } } if ($changed) - { + { open(OUT, ">$file") || die "Can't open $file for output"; print OUT @lines; close(OUT); - } -} + } +} # This is the main program