Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Comparing two arrays

by BrowserUk (Pope)
on Dec 15, 2013 at 13:47 UTC ( #1067232=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    C:\test>perl -MO=Terse -E"@a=map{int rand 2}1..64;@b=map{int rand 2}1.
    +.64; for my$a(@a){ for my $b(@b){ $a==$b and ++$count }}"
    LISTOP (0x34e7c58) leave [1]
    ...
                                        OP (0x34ef0c8) unstack
                        OP (0x34eedd0) unstack
    -e syntax OK
    
  2. or download this
    C:\test>perl -MO=Terse -E"$a=join'',map{int rand 2}1..64;@b=map{int ra
    +nd 2}1..64; $count=($a&$b)=~tr[1][]"
    LISTOP (0x3447bc0) leave [1]
    ...
                PADOP (0x3447550) gvsv  GV (0x33262d0) *count
    -e syntax OK
    
  3. or download this
    C:\test>perl -MO=Terse -E"$a=int rand 2**64;$b=int rand 2**64; $count 
    += unpack '%32b*', $a & $b"
    LISTOP (0x33e7460) leave [1]
    ...
                PADOP (0x33e7178) gvsv  GV (0x32ca5d0) *count
    -e syntax OK
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2014-07-28 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (206 votes), past polls