Subj : test this code To : All From : tony summerfelt Date : Mon Jan 26 2004 11:56 pm could somebody test this code on a binkp log file? i'm getting an invalid date error, the problem seems to be the $moy{$binkdate[2]}. for binkp log entries in Jan it is 1, but gives the error...if i replace it with a 1, the code works fine. i thought i would be clever and cut down on the code by using the Date::Calc module, but i hit this brickwall :) ====================================================================== use Date::Calc qw(Delta_DHMS); $binklog="r:/fidonet/logs/binkd.log"; %moy = ('Jan','1','Feb','2','Mar','3','Apr','4','May','5','Jun','6', 'Jul','7','Aug','8','Sep','9','Oct','10','Nov','11','Dec','12'); ($sec,$min,$hour,$date,$moy,$year,$dow,$doy,$dst)=localtime(time); $year+=1900; $moy++; @today=($year, $moy, $date, $hour, $min, $sec); open (binkd, $binklog) or die "can't open $binklog -- $!"; while() { @binkdate=split(" "); @binktime=split(/:/,$binkdate[3]); @binkdate=(2004,$moy{$binkddate[2]},$binkdate[1], $binktime[0],$binktime[1],$binktime[2]); @diff=Delta_DHMS(@binkdate,@today); print "$diff[0] days, $diff[1]:$diff[2]:$diff[3]\n"; } ================================================================= --- GoldED/spleen 3.0.1-os1+ * Origin: ventedspleen.dyndns.org (1:261/38.5) .