in reply to To check whether value falls in the given range

The usual way of testing if a number is within a certain range,
if ($startrange <= $givenvalue and $givenvalue <= $endrange) ...
can be extended to strings, provided that the range is supposed to be in the usual ASCII collating sequence,
if ($startrange le $givenvalue and $givenvalue le $endrange) ...
This is about three times faster than sorting the three values.
  • Comment on Re: To check whether value falls in the given range