use File::NCopy qw(copy); copy "file","other_file"; copy "file1","file2","file3","directory"; # we want to copy the directory recursively copy \1,"directory1","directory2"; copy \1,"file1","file2","directory1","file3","directory2","file4", "directory"; # can also use references to file handles, this is for backward # compatibility with File::Copy copy \*FILE1,\*FILE2; copy \*FILE1,"file"; copy "file1",\*FILE2; # we don't specify \1 as the first argument because we don't want to # copy directories recursively copy "*.c","*.pl","programs"; copy "*", "backup"; use File::NCopy; # the below are the default config values $file = File::NCopy->new( 'recursive' => 0, 'preserve' => 0, 'follow_links' => 0, 'force_write' => 0, 'set_permission' => \&File::NCopy::u_chmod, 'file_check' => \&File::NCopy::f_check, 'set_times' => \&File::NCopy::s_times, ); set_permission will take two file names, the original to get the file permissions from and the new file to set the file permissions for. file_check takes two parameters, the file names to check the file to copy from and the file to copy to. I am using flock for Unix systems. Default for this is \&File::NCopy::f_check. On Unix you can also use \&File::NCopy::unix_check. This one compares the inode and device numbers. set_times is used if the preserve attribute is true. It preserves the access and modification time of the file and also attempts to set the owner of the file to the original owner. This can be useful in a script used by root, though enyone can preserve the access and modification times. This also takes two arguments. The file to get the stats from and apply the stats to. On Unix boxes you shouldn't need to worry. On other system you may want to supply your own sub references. $file = File::NCopy->new(recursive => 1); $file->copy "file","other_file"; $file->copy "directory1","directory2"; $file = File::NCopy->new(u_chmod => \&my_chmod,f_check => \&my_fcheck); $file->copy "directory1","directory2";