Next | Program Repair Shop | 98 |
(my $copy_target_node) = $dst_file; $copy_target_node=~ tr{/}{\\}; (my $copy_source_node) = $src_file; $copy_source_node=~ tr{/}{\\};
Here we make up new variables to avoid messing up $src_file and $dst_file
Then we never use the original values again!
There was no point in preserving them
$src_file =~ tr{/}{\\}; $dst_file =~ tr{/}{\\};
Hmm, repeated code
tr{/}{\\} for $src_file, $dst_file;
An alternative approach: Use \ everywhere instead of /
Why use / if it's not what you want?
Next | Copyright © 2002 M. J. Dominus |