Next | Program Repair Shop | 51 |
A one line function that is only called from one place is pointless!
(Except sometimes for documentative value)
for my $dir (@InputDir) { &CreateOutputDir("$dir/$NextOut"); }
sub CreateOutputDir { my $dir = shift; mkdir $dir, 0777 or die "Couldn't make dir $dir: $!"; }
Change this to:
for my $dir (@InputDir) { mkdir "$dir/$NextOut", 0777 or die "Couldn't make dir '$dir/$NextOut': $!"; }
Five lines become two
We lost the old reporting behavior, but that is a benefit
Next | Copyright © 2002 M. J. Dominus |