I use the File :: Copy module to copy a file in Perl:
use File::Copy;
copy("somefile.log", "copiedfile.log");
I would like to keep timestamps (especially modification time), but this does not seem to be an option.
Is there an easy way to achieve this without resorting to the "cp -p" system call?
source
share