I don't know if this requires an entire module. File::Find will do the job just fine, at least ever since you can pass not only a wanted() function but also a preprocess() and postprocess() one (which get called upon entering and leaving a directory, respectively).
preprocess() can modify the list of files that get looked at so use it to drop the undesired ones. The wanted() then is a straightforward File::Copy / File::Path application. Finally postprocess() checks if the target directory corresponding to the source one exists and is empty and removes it if so.
It's probably about 25 lines of code total.
Makeshifts last the longest.
In reply to Re: module design musings: File::CopyTree
by Aristotle
in thread module design musings: File::CopyTree
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |