http://www.perlmonks.org?node_id=502212


in reply to Re^2: One out of three ain't bad (order)
in thread One out of three ain't bad

As long as you're going to go through the same code path for each element in the array anyway, why not de-obfuscate that a bit and use the ternary operator?

if (1 == sum( map { $_ ? 1 : 0 } @inputs ))
While tye may be right that, in practice, Perl can't change the value of !0, I just don't like relying on obscure implementation details when clear, well-defined implementation details are available to me to accomplish the same thing in a readable, understandable, and maintainable manner.