use File::NCopy; $c = new File::NCopy(preserve => 1); $c->copy("test", "test2");
This code successfully preserved permissions, group, and modified/access times. Presumably owner would also be preserved, but I'm not running as root so didn't bother to test that. Without preserve => 1, permissions are still preserved but the other stuff isn't.
Thanks, L~R.
-- DrWhy
In reply to Re^2: Perl cp -p?
by DrWhy
in thread Perl cp -p?
by DrWhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |