Duane Koble wrote: > 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. > > if ($HOUR_24 => $PRIME_TIMEFRAME &&
There's your problem. You need >=, => is just a comma operator. > $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"; > > } You'd do yourself (and us!) a few favours by laying out your code better. Also, most people expect local variable names to be all lower-case. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]