in reply to Using "negative" characters with the range operator.
To answer the alphabetical order part of the question, it is alphabetical but only when you use ASCII letters. The range operator .. (in list context) is only able to increment strings matching /^[a-zA-Z]*[0-9]*\z/. If the start and end strings are composed of plain ASCII letters, you do get alphabetical order because the letters are arranged in alphabetical order in the ASCII code map. For example, A is followed by B because the integer value of B is 1 + the integer value of A.
But the range operator doesn't work with Unicode codepoints. Besides, Unicode codepoints often aren't ordered alphabetically in any script, so you wouldn't get a sorted (collated) sequence even if it did.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Using "negative" characters with the range operator. [Unicode::Collate]
by kcott (Archbishop) on Mar 13, 2017 at 07:44 UTC | |
by vrk (Chaplain) on Mar 13, 2017 at 09:49 UTC |