in reply to Re^4: Copying files between directories. How can I improve this code.
in thread Copying files between directories. How can I improve this code.

substr takes up to four parameters. A string, a start offset, a length and a replacement string. In this case, given a string and an offset, it returns the contents of the string from the offset to the end of the string. The statement is slicing the original path off the front of the actual path to the file and retaining the subdirectory path (if any).

Take a look at the code and at the output and you should be able to infer what is going on.


DWIM is Perl's answer to Gödel
  • Comment on Re^5: Copying files between directories. How can I improve this code.
  • Download Code