in reply to multipal NE scalar

Hmm. If you use Quantum::Superpositions you can say something like:
use Quantum::Superpositions; if ($sum ne any(1, 2, 3, 4)) { ... }
It's probably not worth using this module as there are other ways of doing what you want to do. But if you want to do more complex things like Composite Superpositions, it might be worthwhile.

$ perldoc perldoc