Simpler than Scalar::Util's dualvar() would be to use the expression: !1.
In reply to Re: Test RegEx Validity by benizi in thread Test RegEx Validity by aplonis