Newsgroups: perl.perl6.language
From: r...@rodadams.net (Rod Adams)
Date: Sat, 14 Feb 2004 16:30:34 -0600
Local: Sat, Feb 14 2004 5:30 pm
Subject: Re: The Sort Problem
Austin Hastings wrote: I can't find the P5 code I used for it right off, but I remember a case >Off the top of my head, I can't think of a case where the compare sub >would be needed unless the key was not well-ordered. Does anyone have >an example of a case where the key-extraction sub approach doesn't >reduce the problem to a Scalar comparison? when I was playing around with various football (US) stats. I was ranking teams, and had something akin to: @teams = sort {$b->{WinPct} <=> $a->{WinPct} || Creating a keycode for this situation is not a trivial task at all. So Also, I think there is utility in have a compare sub supported so that: -- Rod Adams You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||