Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Matching elements inside two arrays

by Athanasius (Archbishop)
on Apr 10, 2019 at 06:33 UTC ( [id://1232382]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    grep { @input_B eq $_ } @input_array
    
  2. or download this
    for my $inputKey (@input_array)
    {
        if (grep { $inputKey eq $_ } @input_A) ...
    }
    
  3. or download this
    use strict;
    use warnings;
    ...
        print "CC0[$key] = $CC0\n";
        print "CC1[$key] = $CC1\n";
    }
    
  4. or download this
    16:27 >perl 1992_SoPW.pl
    N1: only 1 input is PI
    ...
    CC1[N3] = 1
    
    16:27 >
    
  5. or download this
    $primaryCC0{$inputKey} = [1, 1];
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-24 02:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found