* Aaron Sherman <ajs@ajs.com> [2010-04-04 01:55]: > On Fri, Apr 2, 2010 at 3:57 PM, H.Merijn Brand <h.m.brand@xs4all.nl> wrote: > > As Tom said, and and or are no safer than && and ||, they > > just have a different precedence. The `safer' part is when > > parens are left out > > > > open (FOO, "foo.txt") || die $!; OK > > open FOO, "foo.txt" || die $!; Wrong > > open (FOO, "foo.txt") or die $!; OK > > open FOO, "foo.txt" or die $!; OK > > > > That certainly does look safer to me, yep. It’s safer in this example. It’s more dangerous in other examples. Eric Brine gave one. You’ll do well to consider both examples before you formulate an opinion. You’ll find that they’re simply differently useful, and that safety has nothing to do with it. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>Thread Previous | Thread Next