in reply to Re: Did I match or didn't I? (boo)
in thread Did I match or didn't I?

I don't think that works.... I parse that as:
( my ($bar)=($foo=~m/(ello)/) ) or "default";
which wont work on a failed match.

-Blake

Replies are listed 'Best First'.
Re: Re: Re: Did I match or didn't I? (boo)
by John M. Dlugosz (Monsignor) on Oct 18, 2001 at 02:06 UTC
    Yea, we use || for defaults on the RHS of assignment all the time. E.g. $x= 0||5; print $x; works as expected. The || is done first, and the result of that is what gets assigned. I think he has the meanings of || and or backwards.