in reply to Lazy conditional, skips assignment.
I am little bit confused with your if condiction,here is the code I changed,
our $cookingcounter = 350883; our $garlicbreadheadstart = 600; our $ovenempty = 0; my $holdtime = 0; if ( (!$ovenempty || $true) && ( 0 <= ( $holdtime = $cookingcounte +r + 60 * 90 - 356400) || 0 <= ($holdtime = $cookingcounter + ($garlic +breadheadstart -60 * ( 60 + 15 )) - 356400) ) ) { die sprintf 'Main Dish or Appetizer Cooking: %d, hold for %s', $cookingcounter, $holdtime; } else { printf 'Main Dish or Appetizer Cooking: %d, hold for %s',$co +okingcounter,$holdtime; }
In if condition I have grouped (!$overempty || $true) Of course you did not tell us the $true variable value, and added else{} part. I think else part prints what you expect.
|
|---|