Next Program Repair Shop 213

Unbalanced if-else Blocks

        sub each_file {
          return unless  -T $_ ;
          print "processing $File::Find::name\n";
          unless ( open F, "< $_" ) {
            print "Error opening file for read: $!\n";
            return;
          }
          my $s = <F>; 
          close F;
          unless ( open F, "> $_" ) { 
            print "Error opening file for write: $!\n";
            return;
          }
          $s =~ s/COLUMN1/COLUMN1/ig;
          print F $s;                
          close F;
        }


Next Copyright © 2002 M. J. Dominus