Next | ![]() ![]() |
87 |
What is the programmer trying to accomplish here?
31 $source_node = $pwd.'/'.$source_node;
32 ( my $relative_node ) = $source_node =~/$source_directory(.*)/;
He wants to construct the filename for the destination of a file copy
To do this: Replace the name of the source dir with the target dir
If we don't prepend the source directory name in the first place...
31 $source_node = $pwd.'/'.$source_node;
...then we won't have to remove it again afterwards!
32 ( my $relative_node ) = $source_node =~/$source_directory(.*)/;
Next | ![]() |
Copyright © 2002 M. J. Dominus |