in reply to an odd if then statement

== != 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