I am using the File::Copy module to copy a file in Perl:
#! /usr/bin/perl -w
use File::Copy;
copy("somefile.log", "copiedfile.log");
I would like to preserve timestamps (particularly the modification time), but this doesn't appear to be an option.
Is there a straightforward way to achieve this without resorting to making a system call to "cp -p"?