in reply to Re^2: file copy
in thread file copy
You are asking the same question as you asked in file permissions using File::NCopy and you still haven't properly read and understand the documentation for File::NCopy, the set_permission option to the constructor takes a reference to a subroutine that takes two filenames as it's arguments - the first the one to get the permissions from, and the second one to apply the permissions to. If you really wanted to do that you probably want to do:
but you probably don't want to use File::NCopy but use plain File::Copy and do chmod 0644, $filename after doing the copy.File::NCopy->new('set_permission' => sub { chmod 0644 ,$_[1] })->copy( +$file,"$filename");
/J\
|
|---|