Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have strings like start range and end range and i have to check whether the given value falls in the given range. For example,
$startrange = 'AC23D'; $endrange = 'D25ET'; $givenvalue = 'C3RK5';
I tried to generate all the values between start range and end range using for loop, but i am getting alphabetic range or numeric range, For example,
If i have both alphabets and numbers in the range, i could not able to generate the range properly.for (aa..zz) or for ( 1..1000) or for (a2..g5) #working fine for (A12Z..B23Z) #not working if number comes in between alphabets
How can i check whether the given value falls in the given range. (maximum characters is 5 only as in the example).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: To check whether value falls in the given range
by quester (Vicar) on Nov 27, 2006 at 08:08 UTC | |
|
Re: To check whether value falls in the given range
by cLive ;-) (Prior) on Nov 27, 2006 at 07:49 UTC | |
|
Re: To check whether value falls in the given range
by jwkrahn (Abbot) on Nov 27, 2006 at 07:55 UTC |