in reply to Re: Test RegEx Validity
in thread Test RegEx Validity

Perl's native boolean false, as for example returned by defined, is never undef. Instead it is the dualvar value (numeric: 0, string: "").

You can construct your own dualvar values using the function dualvar() from Scalar::Util. Fun for the whole family! :)

Replies are listed 'Best First'.
Re: Test RegEx Validity
by benizi (Hermit) on Dec 07, 2004 at 18:49 UTC

    Simpler than Scalar::Util's dualvar() would be to use the expression: !1.