May 23, 2011, 12:28 PM
Post #1 of 7
array index for new value
I have been trying to figure out how to do this, and cannot come up with a good solution.
I have a sorted Array with values like this:
18 13 11 10 9 7 4
I have a value of 15, and I want to figure out what the next highest number would be above 15.
For example, from 15, I want to be able to pull 18 out of the above sorted array as a result.
Can anyone point me out in the right direction with some pseudo code on how to do this with perl?