How portable do you want it to be? Portable between any
POSIX system? How should it behave when encountering non-files, like fifos or symbolic links? How do you want
permissions and ownership be handled?
I'd go for a non-Perl solution, and choice any off:
cp -R or cp -a
tar cf - src | (cd dest; tar xf -)
cpio
rsync
I've copied directories zillions of times, but never with
a pure Perl solution.