Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^2: interpretation of "neither...nor"

by strat (Canon)
on Jun 17, 2007 at 09:34 UTC ( #621674=note: print w/ replies, xml ) Need Help??

in reply to Re: interpretation of "neither...nor"

I'd use or and not instead of || && ! because the long names:

  • are better readable, and especially the ! is often "hidden behind other code".
  • have the lowest precedence which might avoid errors if the expressions get more complicated, especially if there are .. ... ?: = += -+ and so on , => within them. Especially stuff like open FH, $filename || die "Error: $!"; is fatal.

So I'd write it the following way, although it is a little bit longer:

print "no editor found\n" unless defined $ENV{EDITOR} or defined $ENV{VISUAL};

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8."

Comment on Re^2: interpretation of "neither...nor"
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://621674]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2015-12-01 23:16 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (29 votes), past polls