in reply to Re: Re: Re: value returned on m// failure
in thread value returned on m// failure

ah, so that is why bitwise AND operation w/ numeric** 1 yields 0 whenever following fails...

(defined $var && $var =~ m/regex/) & 1

...which otherwise would have produced an empty string. thanks mark.

** per perlop, an numeric operand implies numeric bitwise operation; per the table mark posted, false value is zero in numeric context.