From owner-freebsd-bugs Fri Dec 10 6:30: 5 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id B5EEB14D5F for ; Fri, 10 Dec 1999 06:30:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id GAA53631; Fri, 10 Dec 1999 06:30:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Fri, 10 Dec 1999 06:30:02 -0800 (PST) Message-Id: <199912101430.GAA53631@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Andrey A. Chernov" Subject: Re: bin/15370: bug in sort Reply-To: "Andrey A. Chernov" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/15370; it has been noted by GNATS. From: "Andrey A. Chernov" To: Nikita Shamgunov Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/15370: bug in sort Date: Fri, 10 Dec 1999 06:20:40 -0800 On Thu, Dec 09, 1999 at 02:50:52PM +0500, Nikita Shamgunov wrote: > # > # Неверно сортирует > my @array1 = sort {lc($a) cmp lc($b)} @array; It looks like some problem with lc+cmp combination. It works when result of lc assigned to variable first, i.e. sub comp { $aa = lc($a); $bb = lc($b); return $aa cmp $bb; } -- Andrey A. Chernov http://nagual.pp.ru/~ache/ MTH/SH/HE S-- W-- N+ PEC>+ D A a++ C G>+ QH+(++) 666+>++ Y To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message