Next | Program Repair Shop | 161 |
for my $row (0..2) {
for my $col (0..2) {
print ("<td align=center>" . $squares->[$row][$col] . "</td>\n");
}
print ("</tr><tr valign=middle>\n") unless $row == 2;
}
Now let's fix that ? bug:
for my $row (0..2) { for my $col (0..2) { print ("<td align=center>" . ($squares->[$row][$col] || "?") . "</td>\n"); } print ("</tr><tr valign=middle>\n") unless $row == 2; }
This is a more abstract maxim:
Don't confuse internal and external representations of data
Next | Copyright © 2002 M. J. Dominus |