"be consistent" | |
PerlMonks |
RE: or orby reptile (Monk) |
on Jul 08, 2000 at 15:48 UTC ( [id://21644]=note: print w/replies, xml ) | Need Help?? |
Well, here's what the perlop manpage says:
With the C-style operators that would have been written like this:
So in other words, if you said this:
the third argument to unlink would be "gamma" || gripe(); that is, always "gamma" and gripe() would never be evaluated. 'or' is smarter than that. Look at C-style Logical Or and Logical or and Exclusive or on the perlop manpage. It talks a bit about why this happens.
In Section
Seekers of Perl Wisdom
|
|