Perl: the Markov chain saw | |
PerlMonks |
Re: Sort::Key::Natural sorting discrepancyby tangent (Parson) |
on Nov 01, 2017 at 01:57 UTC ( [id://1202490]=note: print w/replies, xml ) | Need Help?? |
I am not familiar with the module but in the docs it says:
Spaces, symbols and non-printable characters are only considered for splitting the string into its parts but not for sorting. For instance foo-bar-42 is broken in three substrings foo, bar and 42 and after that the dashes are ignored.For the examples you give the sort order would then be:
Which to my mind is correct. You might be able to use some variation of the Schwartzian Transform to achieve your desired output.
In Section
Seekers of Perl Wisdom
|
|