From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1KKvL3-0008V2-Ba for garchives@archives.gentoo.org; Mon, 21 Jul 2008 13:22:05 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 08817E039D; Mon, 21 Jul 2008 13:22:03 +0000 (UTC) Received: from duke.localdomain (p70-63.acedsl.com [66.114.70.63]) by pigeon.gentoo.org (Postfix) with ESMTP id D3ABCE0398 for ; Mon, 21 Jul 2008 13:22:02 +0000 (UTC) Received: from [127.0.0.1] (duke.wrkhors.com [127.0.0.1]) by duke.localdomain (Postfix) with ESMTP id 6903928D67E for ; Mon, 21 Jul 2008 09:12:56 -0400 (EDT) Message-ID: <48848B58.9020304@wrkhors.com> Date: Mon, 21 Jul 2008 09:12:56 -0400 From: Steven Lembark Organization: Workhorse Computing User-Agent: Thunderbird 2.0.0.14 (X11/20080601) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Non-case sensitive alphabetical sorting References: <6e2210230807181649v70ed83e1hc39b744b8e080a87@mail.gmail.com> In-Reply-To: <6e2210230807181649v70ed83e1hc39b744b8e080a87@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 98c52ba5-147d-4588-ad1f-e278202dbf74 X-Archives-Hash: 72b2bf0c8f279c3061e29ddcf28811a9 Mark David Dumlao wrote: > When ordering items by name, a separate and distinct sequence is scene > for A-Z before the sequence for a-z. This is the expected behavior. What > might i need to look up to intermix [Aa]-[Zz]? Schwartzian Transform is the perlish version of a technique from LISP: create a compound structure with the output as payload: my @sorted = map { $_->[-1] } sort { $a->[0] cmp $b->[0] } map { my $sortval = uc $_; [ $sortval, $_ ] } @unsorted_text; You can use the basic technique to sort anything (multi-level sorts, numeric, whatever). Same basic process works in other languages that support anon arrays or structs. -- Steven Lembark 85-09 90th St. Workhorse Computing Woodhaven, NY, 11421 lembark@wrkhors.com +1 888 359 3508