Next | Program Repair Shop | 85 |
We're finally at the part of the program that actually does the work!
29 while (my $source_node=readdir $dh) { 30 next if $source_node=~/^\.*$/; 31 $source_node = $pwd.'/'.$source_node; 32 ( my $relative_node ) = $source_node =~/$source_directory(.*)/; ... 52 }
Line 30 skips ... and ...., but that probably is not important
Lines 31-32 have the red flag
Why put $pwd onto the front of $source_node just to strip it off again?
Don't take two steps forward and one step back
At the very least, we should do this operation only once per directory
Next | Copyright © 2002 M. J. Dominus |