Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 ( [id://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?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-18 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found