in reply to To check whether value falls in the given 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.
|
|---|