in reply to getting elements from an array based on a value not in the array

if lima1 is right, you need to specify what you want to get if $target is in the @test and if $size exceeds the boundaries of the array. Next problem is processing duplicates.

I.e., what do you want to get if $target = 5 or if $target = 0?

After you define this, all you need is to implement binary search like BrowserUK's.

NOTE: his solution does not handle the case when $target is outside the array at all.


     s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print