Re: perl flawed or my fault



anno4000@xxxxxxxxxxxxxxxxxxxxxx writes:
I am of a split mind about using ?: in lvalue context. It *is*
kind of obscure, but there are situations that simply call for
it. One is the loop of a binary search, for example

while ( $low < $high - 1 ) {
my $mid = ($low + $high)/2;
$list->[ $mid] le $targ ? $low : $high = $mid;
}

The if-else equivalent to ?: is four lines, even cuddling the else.
I can never bring myself to use it.

I don't object to that so much, but I'd still use the if-else
equivalent (and cuddle the else too! Bwahahahah!) just because I
think it's more readable.

-=Eric
.