Madam has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am using File::Ncopy to copy the file in clearcase environment and the source file is read-only file and i need the destination file should be having read-write permissions(as it is backup file and can be overwritten any number of times).

hence i am using

File::NCopy->new(u_chmod => "777")->copy($filepath,"$filename");
but though i have set the permissions for the destination it is having read-only permissions. please let me know if i am using this API properly or any other way of doing it.

Thanks in advance,
Madam

Janitored by Arunbear - added code tags, as per Monastery guidelines

Replies are listed 'Best First'.
Re: file permissions using File::NCopy
by sasikumar (Monk) on Apr 20, 2005 at 15:09 UTC
    hi

    This is wrong;
    File::NCopy->new(u_chmod => "777")->copy($filepath,"$filename");
    The u_chmod is a reference to a function so u need to pass a reference to it.
    Look at the synopsis of it in cpan.

    Thanks
    SasiKumar