On Fri, 24 Jun 2011, omd wrote:
> On Fri, Jun 24, 2011 at 9:11 PM, Tanner Swett <swe...@mail.gvsu.edu> wrote:
> > On Fri, Jun 24, 2011 at 3:59 PM, Kerim Aydin <ke...@u.washington.edu> wrote:
> >> Anyway, I thought 'perl-or' wasn't the Boolean logical 'or'.  I thought
> >> 'perl-or' was "Do X or die" so that 'or' == 'otherwise'.
> >
> > If I'm not mistaken, 'or' in Perl evaluates its left argument and
> > returns that, unless it is false, in which case it evaluates and
> > returns its right argument. Things like "do X or die" work because the
> > expression "die" is evaluated if and only if "do X" is false.
> 
> Which is the same as ||, just with different precedence.

And, if the items are functions with success values, is the same as 
Do X otherwise Do Y.


Reply via email to