the author said "the number between 10 and 100"
I think the point you're making here is that the word 'between' implies an exclusive upper limit, and so the set of numbers being dealt with is the same as in the Perl list (10 .. 99), and for those numbers lexicographic and numeric comparison in a sort are equivalent. (Actually, Latnam wrote "... the range set to 10 thru 100 ..." [emphasis added] in the OP, but we could have the same "exclusive vs. inclusive upper limit" argument about 'thru' as about 'between'.)
I would agree that lexic and numeric comparison are equivalent over the set produced by (10 .. 99). However, the expression int(rand(91))+10 used both in your example and in the OPed code does produce the number 100, and when this wildcard is thrown into the mix (as I assumed it would be given the explicit code and my interpretations of 'between' and 'thru'), the equivalence breaks down.
>perl -wMstrict -le
"my @set = (10, 20, 100);
my @a = sort @set;
print qq{max in set (@set) is $a[$#a]};
"
max in set (10 20 100) is 20
|