Morning all,

I need to compare the current date with that of a file, if the file is
older than the current date remove it and replace it with a new one from
new data.  Below I have the code set for getting the date but can't come
up with an easy way to compare it against the file date.  Can anyone
tell me the best way to compare the current date with that of the
date/time stamp on a file?

Thanks,
Tim

my $date;
my ($sec,$min,$hour,$mday,$mon,$year) = (localtime) [0,1,2,3,4,5];
$year=$year+1900;
$mon=$mon+1;
$date = sprintf("%02d%02d%02d\_%02d\:%02d\:%02d",
$year,$mon,$mday,$hour,$min,$sec);

Reply via email to