/[pcre]/code/trunk/Detrail
ViewVC logotype

Diff of /code/trunk/Detrail

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

code/trunk/maintain/Detrail revision 97 by ph10, Mon Mar 5 12:36:47 2007 UTC code/trunk/Detrail revision 111 by ph10, Thu Mar 8 16:53:09 2007 UTC
# Line 6  Line 6 
6  # This subroutine does the work for one file.  # This subroutine does the work for one file.
7    
8  sub detrail {  sub detrail {
9  my($file) = $_[0];  my($file) = $_[0];
10  my($changed) = 0;  my($changed) = 0;
11  open(IN, "$file") || die "Can't open $file for input";  open(IN, "$file") || die "Can't open $file for input";
12  @lines = <IN>;  @lines = <IN>;
13  close(IN);  close(IN);
14  foreach (@lines)  foreach (@lines)
15    {    {
16    if (/\s+\n$/)    if (/\s+\n$/)
17      {      {
18      s/\s+\n$/\n/;      s/\s+\n$/\n/;
19      $changed = 1;      $changed = 1;
20      }      }
21    }    }
22  if ($changed)  if ($changed)
23    {    {
24    open(OUT, ">$file") || die "Can't open $file for output";    open(OUT, ">$file") || die "Can't open $file for output";
25    print OUT @lines;    print OUT @lines;
26    close(OUT);    close(OUT);
27    }    }
28  }  }
29    
30  # This is the main program  # This is the main program
31    

Legend:
Removed from v.97  
changed lines
  Added in v.111

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12