Micah J. Cowan wrote:
On Fri, Jul 08, 2005 at 10:28:00AM -0500, Jay Strauss wrote:
Micah J. Cowan wrote:
<snip>
First, you will need to create a comparison function, that will return
an integer less than, greater than, or equal to zero depending on
whether its first argument compares lexically less than, greater than,
or equal to its second argument. This function should match based on
your rules given above, and is meant as an analog for the cmp and <=>
operators.
<snip>
Won't this just match identical records, and not account for his
matching rules? Seems like this is just a programmatic SQL join
(Read the above paragraph).
I didn't really know what you meant by "lexically". I thought you might
be saying:
return -1 if $a lt $b;
return 0 if $a eq $b;
return 1 if $a gt $b;
But I now understand, you want to build sophisticated comparison, maybe
even character by character, to determine -1,0,1. Seems hard, but
you've probably already boiled it down to a one-liner :)
Jay
_______________________________________________
vox-tech mailing list
[email protected]
http://lists.lugod.org/mailman/listinfo/vox-tech