develooper Front page | perl.beginners | Postings from January 2003

Compound if statement.

Thread Next
From:
Duane Koble
Date:
January 30, 2003 07:34
Subject:
Compound if statement.
Message ID:
se38ffa7.022@GHSGWIANW2.GEISINGER.EDU
I am working on a program that requires that three statement be true in order to set a hash.  The problem I am having is getting the if statement to work correctly.  I seems to me that if two of the statements are true it proceeds through the if statement.  I need all three to be true before it proceeds through the statement.
I have copied the if statement below.
Any help will be appreciated.

Thanks
Duane 

          if ($HOUR_24 => $PRIME_TIMEFRAME &&
            $HOUR_24 < $OFF_HOURS_TIMEFRAME &&
            $PRIME_THRESHOLD <= $ELAPSTIME) {
                $STATUS_DB{$C_EWAY_NAME} = "THRESHOLD ERROR,Minimun prime message threshold not met,".
                "$CRITICALITY".","."$TIMESTAMP";
                print PROGRAM_LOG "Ran thru day prime M-F \n";
         }elsif ($OFF_HOURS_THRESHOLD <=  $ELAPSTIME) {
            $STATUS_DB{$C_EWAY_NAME} = "THRESHOLD ERROR,Minimun off hours message threshold not met,".
            "$CRITICALITY".","."$TIMESTAMP";
            print PROGRAM_LOG "Ran thru day off hours M-F \n";
 
         }



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About