in reply to chmod permission issues

chmod is a builtin function in Perl. However, you should be able to preserve permissions with the -p option to cp.