Re: Hamming minigolf post mortem

Juho Snellman <[email protected]>
Newsgroups gmane.comp.lang.perl.golf
Message-ID <[email protected]>
On Sun, Apr 20, 2003 at 01:03:06AM -0400, Ronald J Kimball wrote:
> sort { $a > $b } @list doesn't even work reliably when you're only
> interested in the smallest element.  Consider sorting a list containing two
> elements, 1 and 3.  The outcome will depend on which value is used as $a
> and which as $b.  3 > 1 will return 1, and the result will be (1, 3).  1 >
> 3, however, will return 0, and the result could be either (1, 3) or (3, 1)!

It works reliably in the context of 5.8.0. Try it out! (I tested with
a shuffled array of two million elements before deciding that it wasn't
just a fluke).

-- 
Juho Snellman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.