Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: security.department@xxxxxxxx (John Doe)
- Date: Fri, 29 Apr 2005 15:49:31 +0200
Am Freitag, 29. April 2005 14.43 schrieb DBSMITH@xxxxxxxxxxxxxx:
> So which is safer more ideal to use : || , or
>
>
> Derek B. Smith
> OhioHealth IT
> UNIX / TSM / EDM Teams
[...]
The only difference between "||" and "or" is the precedence, and the
precedence of "=" lies between them.
To my understanding, in the "assign or die" special case,
my $a=do_something_which_can_fail() or handle_exception();
is more logic than
my $a=do_something_which_can_fail() || handle_exception();
because something should be assigned to $a, and if that fails, the app should
e.g. die. This way, the exception handling is not part of the assignement.
On the other side, I would use
my $a=do_something_which_can_fail() || provide_some_default();
because the exception handling consists of providing a value.
Just my personal way to look at it :-)
joe
.
- References:
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: DBSMITH
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- Prev by Date: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Next by Date: RE: REGEXP removing - il- - -b-f and - il- - - - f
- Previous by thread: RE: REGEXP removing - il- - -b-f and - il- - - - f
- Next by thread: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Index(es):