MODIFIED DATE AN D TIME

  • Thread starter teambcdsoftware
  • Start date
T

teambcdsoftware

Hello,

Activestate,Windows XP + Perl 5.8
I need some help with a function that I use to create files.
I have a source file that I use to get parameters to create the new
files.
I need to get the modified date and time of the source file and set the
last modified date of the new file to the source file's last modified
date.
code so far
==========================================
use Date::Manip;

$modified = time - ((-M $file) * 86400);
$filemdate = localtime($modified);
$filemdate = UnixDate ($filemdate, "%Y%m%d - %H%M%S");
print "$filemdate\n";

But this is a value that changes as time changes and is not static....
Please help if you can.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top