== != eq ;)
This means you are doing a numeric compare but you want an string compare here: if ($discount == "40+15") as 40+15 is only partly numeric. If you are sure that there are no whitespaces this is the way to go, otherwise (to allow sth like "40 + 15") use a regex if ($discount =~ /^\s*40\s*+\s*15\s*$/)
-- Hofmator
In reply to Re: an odd if then statement
by Hofmator
in thread an odd if then statement
by sologretto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |