in reply to RE: mybooks.pl (or or | | )
in thread mybooks.pl
Well, yes and no. If you use open as a list operator like this:
then you will not get what you want. However, this:
will do what you want it to (which is what zdog used).
So in general, or is a safer bet, but || is not necessarily wrong. And perl will let you know that there is a precedence problem if you use -w.
BlueLines
Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.
open FOO || die "Argh: $!\n";
then you will not get what you want. However, this:
open (FOO) || die "Argh: $!\n";
will do what you want it to (which is what zdog used).
So in general, or is a safer bet, but || is not necessarily wrong. And perl will let you know that there is a precedence problem if you use -w.
BlueLines
Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: RE: mybooks.pl (or or )
by tye (Sage) on Aug 09, 2000 at 08:29 UTC | |
RE: RE: RE: mybooks.pl (or or )
by BlueLines (Hermit) on Aug 11, 2000 at 04:06 UTC | |
by tye (Sage) on Aug 11, 2000 at 16:59 UTC |
In Section
Code Catacombs