"Veli-Pekka Tätilä" wrote, on Friday, May 05, 2006 12:34 PM : > I can't find anything in the doc about whether Perl's sort function : > maintaining the order in equivalent subsequences. : : Hi, : You could take a look at: : : Perl\html\lib\sort.html : : To summarize V5.8 seems to be using the merge sort algorithm : which is stable, i.e. maintains the original ordoring in : elements that are determined to be equal. 5.6 and earlier use : a quick sort by default and it is not stable. In 5.8 at : least, you can choose which algorithm should be used with the : sort pragma that the above HTMl page in Active State Perl documents.
Thanks to all who responded. Unfortunately, I'm stuck with 5.6 due to a third-party module that breaks with 5.8. Also, to those who suggested a two-criteria sort, I perhaps misled you by using 'a', 'b', etc.; the names don't come in a sorted order, but are read from a user preference file and we want to maintain that order. Unless ... I could also store the index in the hash ref (seems a little wasteful, but would solve the problem). Thanks again, Joe Joseph Discenza, Senior Programmer/Analyst mailto:[EMAIL PROTECTED] Carleton Inc. http://www.carletoninc.com 574.243.6040 ext. 300 Fax: 574.243.6060 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs