my @array = @$arrayref; my $word = $$wordref; #### while ($lo <= :w $hi) { #### $lo = ++$try; # without increment there will be ... $hi = --$try; #### if ($array[$try] lt $word) { $lo = ++$try; # without increment there will be # a dead loop in the 4th case, # see the note at the bottem next } elsif ($array[$try] gt $word) { $hi = --$try; next } else { return $try }