in reply to cloning a directory tree

There is a subtle detail here that makes a difference: Are you just cloning the directories, or are you also copying all the files in those directories? For copying directories and files there are a few existing CPAN modules:

I'm not familiar enough with rsync to know whether or not it supports copying just directories and not the files in them (I've always used it to copy both). Maybe Randal can answer that since he's put a lot of work into his smart version.

On many UNIX systems cp has a -r option that allows you to recursively copy an entire directory tree.