Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Comparing two arrays

by BrowserUk (Patriarch)
on Dec 15, 2013 at 13:47 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1067232]
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-25 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found