http://qs321.pair.com?node_id=1106894


in reply to my 'if' condition doesn't work, why?

The expression (40||47||76) "short-circuits" and evaluates to 40. Scalar $n is then only compared to 40.

Edit: the solution is as toolic suggests, though I tend to use the low-precedence or operator by default (rather than the high precedence one, ||), as it more often does what I expect.