in reply to <=> vs cmp
You can sort with cmp instead of <=>; the question is if you'll like the results.
DB<1> x sort { $a cmp $b } 1..10 0 1 1 10 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 DB<2> q
In Section
Seekers of Perl Wisdom
in reply to <=> vs cmp
You can sort with cmp instead of <=>; the question is if you'll like the results.
DB<1> x sort { $a cmp $b } 1..10 0 1 1 10 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 DB<2> q