Next Program Repair Shop 212

Unbalanced if-else Blocks

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


Next Copyright © 2002 M. J. Dominus