in reply to Comparing Dates With a Twist

Ok Monks, I think I'm almost there, but I'm still having problems with the comparing dates...I've decided to go with the Date::Calc module specifically the Delta_Days function. I think I have all the code down but it's not comparing the Delta_Days is not working with my if statement. Can anyone tell me what I'm doing wrong? My guess is my loops are all *@!$ed up but I don't know where to start.

Here's my code:
#!/usr/local/bin/perl5 -wT print "Content-type: text/html\n\n"; use Date::Calc qw(Delta_Days); @Months = ('1','2','3','4','5','6','7','8','9','10','11','12'); ($Month_Day,$Month,$Year) = (localtime)[3,4,5]; $Year += 1900; open(HANDLE,"../script_integration_data/script_integration_records"); while (<HANDLE>) { @temp1 = split(/:/); $domain = unpack ("A4", $temp1[40]); $day_diff = Delta_Days($temp1[28], $temp1[30], $temp1[29], $Year, $ +Month, $Month_Day); if (($domain eq "BBA") && ($temp1[36] eq "In Production") && ($day_ +diff <= 90)) { $sum += $temp1[38]; $count++; } } close(HANDLE); $average = $sum / $count; if ($average >= 44) { print sprintf "<blink><font color=\"#FF0000\">%.f days</font></blin +k>", $average; } elsif (($average >= 11) && ($average <= 44)) { print sprintf "<font color=\"#FFFF00\">%.f days</font>", $averag +e; } elsif ($average <= 10) { print sprintf "<font color=\"#669900\">%.f days</font>", $average; } # EOF
Much Thanks!

-Gus