Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Matching elements inside two array

by ameezys (Acolyte)
on Apr 10, 2019 at 04:41 UTC ( [id://1232379]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @input_array = N1 N2 N3 N6 N7
    @input_A = N1 N3 N11 N11 N10 N16
    @input_B = N3 N6 N2 N7 N16 N19
    
  2. or download this
       if (grep { @input_B eq $_ } @input_array) 
       {
    ...
       }
       else
       {print "this is a wire\n\n";}
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1232379]
Approved by Athanasius
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found