natol44 has asked for the wisdom of the Perl Monks concerning the following question:
Hi!
I have a sorted array of numbers low=>high and need to test IF one of the values is between $a and $b. And if more than one of the values is betwen $a and $b, need to take the higher.
One hour ago, I began to try, so far nothing positive unless long foreach and IF statements... There is probably a faster method?
Thank you for your help!
I have a sorted array of numbers low=>high and need to test IF one of the values is between $a and $b. And if more than one of the values is betwen $a and $b, need to take the higher.
One hour ago, I began to try, so far nothing positive unless long foreach and IF statements... There is probably a faster method?
Thank you for your help!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Array, element inside limits
by RMGir (Prior) on Jun 15, 2009 at 16:07 UTC | |
Re: Array, element inside limits
by Transient (Hermit) on Jun 15, 2009 at 16:17 UTC | |
by jwkrahn (Abbot) on Jun 15, 2009 at 16:37 UTC | |
by Transient (Hermit) on Jun 15, 2009 at 17:11 UTC | |
by ikegami (Patriarch) on Jun 15, 2009 at 17:40 UTC | |
by RMGir (Prior) on Jun 16, 2009 at 11:53 UTC | |
by ikegami (Patriarch) on Jun 16, 2009 at 13:59 UTC |
Back to
Seekers of Perl Wisdom