in reply to Re^3: Sorting numerials first and then numerials with alpha characters last
in thread Sorting numerials first and then numerials with alpha characters last
Chaining sorts only works for stable sorts. What is stability in sorting algorithms and why is it important?
Perl's sort isn't even stable in all versions of Perl, so the solution won't work in all existing versions of Perl.
Perl's sort isn't guaranteed to be a stable sort, so the solution isn't guaranteed to work in future versions of Perl.
But, you can tell sort to use a stable algorithm using use sort 'stable';.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Sorting numerials first and then numerials with alpha characters last
by Anonymous Monk on Oct 29, 2021 at 18:42 UTC | |
by ikegami (Patriarch) on Oct 29, 2021 at 18:43 UTC | |
by Anonymous Monk on Oct 29, 2021 at 18:47 UTC |