Next | Program Repair Shop | 83 |
opendir ($dh,$pwd) || die "Can't open dir $pwd: $!";
The big problem with this line is that we eliminated $pwd:
18 my ($pwd,$i)=($_[0],$i++);
We now have:
my ($src,$dst) = @_;
This suggests that $pwd should be replaced with $src
But we already replaced $source_directory with $src
Are they really the same thing?
So it would seem!
It's confusing when functions have hardwired global variables
Even worse when recursive functions have hardwired global variables
Next | Copyright © 2002 M. J. Dominus |