in reply to Re^3: logic problem with perl game
in thread logic problem with perl game

PeterPeiGuo, your doubled parentheses serve no function. Perhaps you meant to contain each condition in parentheses? But even so, your advice only complicates the code, by losing operater-precedence contrast.

To mynameisG, regarding the original post: your original conditional code is perfect -- easy to read and does what it says. The reason "and" and "or" exist as low-precedence operators is for that very reason. You don't need to add parentheses (especially ones that do nothing) when "and" and "or" always have lower precedence than comparison operators like "eq" and ">=".