Fw: [PLUG] OT: Databases
Curtis Poe
cp at onsitetech.com
Thu Sep 19 22:09:22 UTC 2002
> 1. Remove all non-word characters, leaving only letters, numbers, and
> underscores.
> 2. Lower case all letters.
> 3. Join the fields in List A into one field and make them hash keys.
> 4. Iterate over List B and check for existence in List A. If it exists,
> stuff into an array.
>
> The following quick, dirty, and untested code (in Perl) should give you an
> idea of what I mean:
<snip>
Oops! There was a bug in my code. Creating the $data key in the second
while loop should only use the fields defined in List A. The second while
loop should define data as follows:
my $data = join '', @{$csv->fields}[0..4];
Also, my heuristic was a general case that should catch *most* of that
matches, but that greatly depends on the data.
Cheers,
Curtis
More information about the PLUG
mailing list