in reply to copy files and directories recursively
You have to adjust your logic.
You are not testing the entries to copy for being directories.
You have one -d test, but that is done on the "constant" (i.e. never changed) $newDir.
|
---|
In Section
Seekers of Perl Wisdom