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

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

Thread Previous | Thread Next
From:
Marvin Humphrey
Date:
April 4, 2010 07:07
Subject:
Re: RFC: Perl manual pages -- update to follow the perlstyle.pod guidelines
Message ID:
20100404140711.GA23377@rectangular.com
On Sun, Apr 04, 2010 at 07:50:41AM -0600, Tom Christiansen wrote:
> I simply reject their premise that or is ipso facto superior to
> || and I don't want to see that position promulgated as the gospel it is not.

In the case of open(), I would argue that "or" is superior to "||" because it
works whether there are parens or not.

  open(my $fh, "<", "foo.txt") or die $!;
  open my $fh, "<", "foo.txt" or die $!;

Isn't this exactly the sort of situation that low-precedence "or" was designed
for?

Marvin Humphrey


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