I'm trying to write a simple script that will take file or directory and copy it to a destination. I basicaly want to emulate the unix command "cp -rp blah1 blah2". File::Copy doesn't seem to be powerful enough since doesn't do directories and I'm it doesn't say how it handles permissions.
I'm willing to do a check to see I'm copying a file or directory. What I don't want to do is a bunch of looping to traverse down the directory tree and keep track of where I am.
Unix does this on one line. Perl has to have some simple equivalent.