DrWhy has asked for the wisdom of the Perl Monks concerning the following question:
use File::Copy; my $file = '/whatever/you/want'; my $bak = $file . '.bak'; (undef, undef, $mode, undef, $uid, $gid) = stat $file; copy($file, $bak); chmod $mode, $bak; chown $uid, $gid, $bak;
Note this code has not been tested; I'm just presenting the basic idea i have in mind and am hoping not to have to implent :)
...hoping I just missed the right module in my search through CPAN...
--DrWhy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl cp -p?
by Limbic~Region (Chancellor) on Aug 20, 2004 at 22:02 UTC | |
by DrWhy (Chaplain) on Aug 20, 2004 at 22:43 UTC | |
|
Re: Perl cp -p?
by TomDLux (Vicar) on Aug 21, 2004 at 01:50 UTC | |
by bgreenlee (Friar) on Aug 21, 2004 at 21:00 UTC |