Your logic is off, you're telling the interpreter to set
$price1 = 7, only if:
than 40,000". It will never be both, it can only be one or
the other. You are saying that it has to be both.Here's your original code:
Just change it to something like the following:
$price1 =7;
}I think that will accomplish what you wanted. But, what
happens if the price is exactly 4,000 or 40,000? In those
cases, the $price1 variable will NOT be set to 7. To do
that, just add an equal sign (=) after the less than (<) or
greater than (>) symbol that you want.
For example to set $price1=7 when the $price is between
4,000 and 40,000, or exactly 4,000, then you would do this:
$price1 =7;
}And the same if you wanted it set when the price was at 40,000, like this: $price <= 40000
Hope that helps,
-Steven
$price1 = 7, only if:
Code:
"The $price is less than 4,000", and "The $price is more than 40,000". It will never be both, it can only be one or
the other. You are saying that it has to be both.
Just change it to something like the following:
Code:
elsif (($price > 4000) && ($price < 40000 ) && ($agent2 eq "ok")) { $price1 =7;
}
happens if the price is exactly 4,000 or 40,000? In those
cases, the $price1 variable will NOT be set to 7. To do
that, just add an equal sign (=) after the less than (<) or
greater than (>) symbol that you want.
For example to set $price1=7 when the $price is between
4,000 and 40,000, or exactly 4,000, then you would do this:
Code:
elsif (($price >= 4000) && ($price < 40000 ) && ($agent2 eq "ok")) { $price1 =7;
}
Hope that helps,
-Steven