The
sort builtin is implemented using Quicksort up to Perl 5.6.1; in 5.8 it has been switched to a stable Mergesort, and using
physgreg's idiom will do what you want faster than any module written in Perl itself is ever likely to achieve.
Makeshifts last the longest.