| Next | Program
Repair Shop ![]() |
196 |
if (@files) {
foreach (@files) {
unlink("$dir/$_") || &err("can't delete $_ : $!");
}
}
We have seen this before
Here the if test is unnecessary
If @files is empty, the loop is self-skipping
Avoid Special Cases
If the code is well-designed, it can often handle both cases the same way
| Next | ![]() |
Copyright © 2002 M. J. Dominus |