in reply to Copying files between directories. How can I improve this code.
If you really want to do it in Perl, you might find File::Find helpful. I noticed that you have a comment saying #recursively search $path for files, but your code doesn't recurse into subdirectories at all :) GrandFather already pointed this out
Another minor detail is that you're not distinguishing between files and directories, and I'm pretty sure that File::Copy's copy function doesn't handle copying directories.
|
|---|