Check out Date::Manip; it can do just about anything you'd need to do with dates. If
speed is of great concern (I use Date::Manip and it performs fine), you may be able
to find another Date::* module more specifically tuned to your needs. 

Definitely try Date::Manip first though, as it will work for you. Plus it's easy and
well documented. Looks like you'd want to stat both of your files, then pass the
dates into Date::Manip, where you can do whatever with it.

Matt

--- Alex Harris <[EMAIL PROTECTED]> wrote:
> 
> 
> if I use the following to get the date of a file:
>     use File::stat;
>     use Time::localtime;
>     $date_string = ctime(stat($file)->mtime);
>     print "file $file updated at $date_string\n";
> 
> I get:
>    Mon Jan  7 10:21:21 2002
> 
> Now I want to compare another file date to this one getting the date the 
> same way but I don't understand the following example:
> 
>     sub getdate {
>       local($_) = shift;
>       s/-(\d{4})$/+$1/ || s/\+(\d{4})$/-$1/;
>           # getdate has broken timezone sign reversal!
>       $_ = `/usr/local/lib/news/newsbin/getdate '$_'`;
>       chop;
>       $_;
>     }
> 
> I can't use c modules because they haven't been added and I don't have 
> permissions.  TIA
> 
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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

Reply via email to