>>>>> "Uri" == Uri Guttman <[EMAIL PROTECTED]> writes:
Uri> sorting in p6 is not at all like in p5. instead of coding up an explicit Uri> comparison code block and duplicating all the key access code (for $a Uri> and $b), you will specify how to extract/generate each key for a given Uri> record. this new syntax was posted by damian (who else) and it is very Uri> similar to the api in my p5 module sort::maker (we did discuss this Uri> api). i don't know if any A/E/S doc covers it but it is definitely in Uri> the archives. I hope the old (perl5) way is still available as well. There are times when parts of the comparison should be done lazily. Consider two objects that have a value for a primary sorting order, but only for those which the value is the same, we fall back to a secondary sort key that is expensive to compute (like maybe calling a database). For these scenarios, specifying the sort comparison will be simpler and cheaper than specifying the sort key. So, we need both, but if we get only one, the Perl5 way is superior. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!