Making my way through Vincent Lowe's "PERL Programmers - Interactive Workbook", I'm having trouble agreeing with the solution to a "neither...nor" coding issue.
The assignment posed in the text: "Write an instruction that prints a message if neither of the environment variables EDITOR nor VISUAL is defined."
The text's suggested answer to this:
By my interpretation, the correct operator should be &&, what say you, Monks?print "no editor found\n" if ! (defined $ENV{EDITOR} || defined $ENV{VISUAL});
Thanks!
In reply to Re: interpretation of "neither...nor" by cgmd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |