Keep It Simple, Stupid | |
PerlMonks |
Re: Re: cp -p in perl?by BuddhaNature (Beadle) |
on Apr 20, 2004 at 23:37 UTC ( [id://346829]=note: print w/replies, xml ) | Need Help?? |
It looks like (so far) the best way to do this is to do all your work on a tempfile ( I like File::Temp myself) version of the file you want to copy and then do your chmod and/or chown on the tempfile and then use rename(). This seems to work correctly.
In Section
Seekers of Perl Wisdom
|
|