develooper Front page | perl.perl5.porters | Postings from April 2010

Re: RFC: Perl manual pages -- update to follow the perlstyle.podguidelines

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
April 3, 2010 17:21
Subject:
Re: RFC: Perl manual pages -- update to follow the perlstyle.podguidelines
Message ID:
20100404001921.GM13645@klangraum.plasmasturm.org
* 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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About