Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Comparing two arrays

by hdb (Monsignor)
on Dec 15, 2013 at 10:38 UTC ( [id://1067221]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @x = qw( 0 0 0 0 1 1 0 0 0 0 1 0 );
    my @y = qw( 1 0 0 0 1 0 1 0 1 0 1 0 );
    ...
    my $compare = $x & $y;
    my $joint = $compare =~ tr/1/1/;
    print "$joint\n";
    

Log In?
Username:
Password:

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

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

    No recent polls found