my $comparetodate = 20020220194516; # This would probably be taken from a database or something. my ($sec, $min, $hour, $mday, $mon, $year) = localtime; my $date = sprintf "%04d%02d%02d%02d%02d%02d",$year+1900,$mon+1,$mday,$hour,$min,$sec; print "Content-type: text/html\n\n"; if ($date > $comparetodate) { print "Right now is after the archived date."; } else { print "Right now is before the archived date."; }