Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by Kenosis (Priest)
on Oct 28, 2013 at 19:41 UTC ( #1060052=note: print w/replies, xml ) Need Help??


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

Or just use Perl's 'smart' operator (no hash needed):

print $_ ~~ @array2 ? "$_: Match!\n" : "$_: No Match\n" for @array1;
  • Comment on Re^2: Matching 2 unordered arrays then printing the first array highlighting the matches?
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2023-02-08 23:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (44 votes). Check out past polls.

    Notices?