Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Matching 2 unordered arrays then printing the first array highlighting the matches?

by Anonymous Monk
on Oct 28, 2013 at 21:10 UTC ( [id://1060065]=note: print w/replies, xml ) Need Help??


in reply to Matching 2 unordered arrays then printing the first array highlighting the matches?

Screw all that ... keep it simple. Presumably you are generating a web-page. So, iterate through the first list, and, for each element in the second, use the grep function to look for matching entries to $_. Use a scalar-context since the only thing you care about is whether matching-entries exist. If the result is greater-than-zero, generate the "Match!" string in the second column. Data-volumes in the "thousands of" records frankly do not warrant the use of more-advanced magick.
  • Comment on Re: Matching 2 unordered arrays then printing the first array highlighting the matches?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-26 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found