cjacksonjr has asked for the wisdom of the Perl Monks concerning the following question:
foreach $supply (@supplies) { $AlarmCount++ if(($supply->[4] - $supply->[3]) <= $AlarmFilter) +; my $dbEvents = new Sybase::CTlib 'ops','opsops','OPSYB1','fillev +entsT'; $dbEvents->ct_sql("use rhic_au_fy01_fill"); my $sql = "SELECT * FROM fillEventsT WHERE rhicTime like 'Oct%' and (event like 'ev-bquenc +h' or event like 'ev-yquench')"; my(@fills,$fill); @fills = $dbEvents->ct_sql($sql); foreach $fill (@fills) { # how many alarms occur w/in (Y) second +s of a QUENCH EVENT? $QuenchCount++ if(($supply->[3] - $fill->[0]) <= $QuenchFilter) an +d (($supply->[3] - $fill->[0]) > 0); } } sub GetQuenchTimes { # put quench times in a hash use strict; my $dbEvents = new Sybase::CTlib 'harmless','harmless','OPSYB1','fil +leventsT'; $dbEvents->ct_sql("use rhic_au_fy01_fill"); my $sql = "SELECT rhicTimeUS, rhicTime FROM fillEventsT WHERE rhicTime like 'Oct%' and (event like 'ev-bquench' o +r event like 'ev-yquench')"; my(@times,$time); @times = $dbEvents->ct_sql($sql); foreach $time (@times) { $rhicTimeUS{$time->[0]}; print "<$time->[0]> \n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to speed up program?
by dws (Chancellor) on Aug 16, 2002 at 16:46 UTC | |
by Anonymous Monk on Aug 16, 2002 at 22:33 UTC | |
|
Re: how to speed up program?
by Zaxo (Archbishop) on Aug 16, 2002 at 15:56 UTC |