--- Uri Guttman <[EMAIL PROTECTED]> wrote:
>       @out = sort
>               key( %lookup{ .{remotekey} } ),
>               key:insensitive:descending:locale( 'somewhere' )( .{priority} ),
>               key:float ( substr( 0, 10 ) ),
>               key:integer ( /foo(\d+)bar/ ),
>               key:compare( { ^$a <=> ^$b } )( /(\d+)$/ ),
>               key:compare( \&my_compare_sub ) ( /(\d+)$/ ),
>               @in ;
> 

...

> note that the custome compare callbacks can be a block or a sub
> name/ref. the callback sub would be passed 2 args as usual.

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? 

=Austin

Reply via email to