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 (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?
[holli]: it's not always possible to do a complete rewrite without cutting off some pigtails
[Discipulus]: indeed! new firefox seems poorer: many tab crash, and you open this link in FF?
[Discipulus]: problem scrolling even main page..;=(
[LanX]: holli -> Good Intentions: Wikisyntax for the Monastery
[LanX]: monklinks are automatically converted ...
[LanX]: On another node, I just saw yesterday that the everything engine supports auto-paragraph whithout the need to type <p>
LanX i.e. the newest everything engine

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2017-11-20 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (291 votes). Check out past polls.

    Notices?