in reply to Comparing array contents to DB contents
The next code shows the idea, I've not actually run it (lack of data prevents that), but at least it compiles. It looks simple enough so it might work.
ROW: foreach my $row (@$list) { for my $i (0 .. $#vals) { unless ($vals[$i] && $row->[$i+1] && String::Approx::amatch($row->[$i+1], $vals[$i])) { next ROW; } } # All succesful! return $row->[0]; } # Boohoo... no match. return;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Comparing array contents to DB contents
by castaway (Parson) on Jan 30, 2003 at 11:50 UTC |