Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!ukma!dftsrv!mimsy!mojo!eng.umd.edu!stripes From: stripes@eng.umd.edu (Joshua Osborne) Newsgroups: comp.lang.perl Subject: Is Perl's sort stable? Keywords: sort, perl Message-ID: <1991Apr3.224701.9318@eng.umd.edu> Date: 3 Apr 91 22:47:01 GMT Sender: news@eng.umd.edu (C-News) Reply-To: stripes@eng.umd.edu (Joshua Osborne) Organization: College of Engineering, Maryversity of Uniland, College Park Lines: 13 Is Perl's sort stable? By that I mean if I have a list of 6 char long scalers, and ask sort to sort by the last 3 letters and then again by the first 3 will I have the same effect as if I had sorted by all six in the same place? (I am asking because I have data sorted by date given in a messy date format, and I want to sort by user name but preserve the secondary sorting by date... I could solve the problem without assuming Perl's sort is stable, but why go to all that extra work if Perl does do a stable sort?). -- stripes@eng.umd.edu "Security for Unix is like Josh_Osborne@Real_World,The Multitasking for MS-DOS" "The dyslexic porgramer" - Kevin Lockwood "CNN is the only nuclear capable news network..." - lbruck@eng.umd.edu (Lewis Bruck)