in reply to Re: To || or not to or and why.
in thread To || or not to or and why.
it is not the same asopen FILE, "file" or die;
since || has a higher precedence than open the "file" || die gets evaluated before the open. So it will not die even if the open fails. or has a lower precedence than open so the open gets evaluated first in the first example. To have the same effect using || you have to useopen FILE, "file" || die;
open(FILE, "file") || die;
--
flounder
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: To || or not to or and why.
by krisahoch (Deacon) on Sep 16, 2003 at 16:09 UTC | |
by flounder99 (Friar) on Sep 17, 2003 at 20:54 UTC |