suggus has asked for the wisdom of the Perl Monks concerning the following question:
Much Thanks!#!/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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Am I missing something here?
by dws (Chancellor) on Nov 07, 2001 at 07:02 UTC | |
by sifukurt (Hermit) on Nov 07, 2001 at 19:47 UTC | |
by Biker (Priest) on Nov 07, 2001 at 20:05 UTC | |
by lestrrat (Deacon) on Nov 08, 2001 at 23:09 UTC | |
by Biker (Priest) on Nov 09, 2001 at 01:18 UTC | |
by blakem (Monsignor) on Nov 08, 2001 at 00:47 UTC | |
by Biker (Priest) on Nov 08, 2001 at 01:44 UTC | |
| |
|
Re: Am I missing something here?
by Fastolfe (Vicar) on Nov 07, 2001 at 07:17 UTC | |
|
Re: Am I missing something here?
by DaWolf (Curate) on Nov 07, 2001 at 19:32 UTC | |
|
Re: Am I missing something here? I GOT IT EVERYONE!
by suggus (Sexton) on Nov 08, 2001 at 04:18 UTC |