in reply to Re: Re: Image::Magick resize question
in thread Image::Magick resize question
Let's just pretend that it did return a value (even though it doesn't). Even then, wouldn't the line
$image->Read(file=>\*IMAGE) || die "Unable to read image: $!";
be better written as
$image->Read(file=>\*IMAGE) or die "Unable to read image: $!";
The difference being using or instead of ||. Not that it will do anything in this case, but when checking for return values in $!, is one not always suppose to use the "or" operator rather than "||"? I believe I was once told that using "or" (since it has a higher precedence) is always preferred when dealing with this type of situation. Did I hear wrong or am I right? Or does it depend upon the type of function called?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
or vs || precedence issue
by Aristotle (Chancellor) on Jun 08, 2002 at 22:51 UTC | |
by emilford (Friar) on Jun 09, 2002 at 15:31 UTC | |
by Aristotle (Chancellor) on Jun 09, 2002 at 20:03 UTC |