Next Program Repair Shop 221

Families of Variable Names

     56                $chain1[$i] =~ s/0/L/g; $chain1[$i] =~ s/1/H/g;
     57                $chain2[$i] =~ s/0/L/g; $chain2[$i] =~ s/1/H/g;
     58                $chain3[$i] =~ s/0/L/g; $chain3[$i] =~ s/1/H/g;
     59                $chain4[$i] =~ s/0/L/g; $chain4[$i] =~ s/1/H/g;
     60                $chain5[$i] =~ s/0/L/g; $chain5[$i] =~ s/1/H/g;
     61                $chain6[$i] =~ s/0/L/g; $chain6[$i] =~ s/1/H/g;
     62                $chain7[$i] =~ s/0/L/g; $chain7[$i] =~ s/1/H/g;
     63                 print OUTFILE2 "\n(ct_so
     64 $chain1[$i]$chain2[$i]$chain3[$i]$chain4[$i]$chain5[$i]$chain6[$i]$chain7[$i]
     65  )";

        for (@chain) { 
          $_->[$i] =~ s/0/L/g; 
          $_->[$i] =~ s/1/H/g;
        }
        my @chars = map $_->[$i], @chain;
        print OUTFILE2 "\n(ct_so\n", join("", @chars), "\n)";


Next Copyright © 2002 M. J. Dominus