You could always try storing the value in time() format.  (E.g. print
OUTFILE time."\n";)  Then you can check to see if the file is over two days
old like this:

my $time = time;

if($time > $filetime + 172800){
   unlink $file;
}
#172800 is the number of seconds in two days.

-----Original Message-----
From: Francesco Guglielmo [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 12, 2002 6:58 AM
To: [EMAIL PROTECTED]
Subject: Date


I need to do a Perl script who do a certain command after 2 days.Example:
my file contains

8 Jul 2002

when I lunch the script it must control the date and if it's equal to 
date+2 (in this case 10 Jul 2002) execute my commands trought system.I 
thought to do this transforming the date in this format to days from the 
begin of the year but I don't know how.Thanks for your help,
Francesco


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to