Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Comparing array contents to DB contents

by Gilimanjaro (Hermit)
on Jan 30, 2003 at 10:38 UTC ( [id://231251]=note: print w/replies, xml ) Need Help??


in reply to Re: Comparing array contents to DB contents
in thread Comparing array contents to DB contents

Or, slower (no short-circuit) but shorter:

foreach $row (@{$list}) { my @matching = map { String::Approx::amatch($row->[$_+1],$vals[$_]) ? $_ : () } (0..$#vals); return (@matching==@vals) ? $row[0]; } # none found; do the insert, get the new id and return it

(no check for undef columns here either...)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://231251]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-28 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found