in reply to Re: interpretation of "neither...nor"
By my interpretation, the correct operator should be &&, what say you, Monks?What prevents you from doing so?
But, I would say,print "no editor found\n" if (!defined $ENV{EDITOR} && !defined $ENV{VISUAL});
If you have some interpretation, just run the code to see if the result meets what you expect. Otherwise, trying to "read" the code more verbally is one way to have some grasp whenever I get a little puzzled. "If this is false: EDITOR is undefined, or, VISUAL is undefined then I have no predefined editor set". I keep repeating that until it fits mentally into my understanding. In this particular example, I usually end up with: "OK, I'll do it with unless....".die "no editor found\n" unless my $editor = $ENV{EDITOR} || $ENV{VISUAL}; print "predefined editor: $editor\n";
You can also talk to your teddy bear or your monitor in this process.
Update: (18-06-2007) I found bobf's True or False? A Quick Reference Guide also quite a reference with many examples and enlightening tables.
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
|
|---|