Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: bit array comparison

by Athanasius (Bishop)
on Oct 23, 2019 at 03:05 UTC ( #11107872=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $i_cnt = () = sprintf("%b", $i) =~ /1/g;
    my $u_cnt = () = sprintf("%b", $u) =~ /1/g;
    
  2. or download this
    my $i_cnt = sprintf('%b', $i) =~ tr/1//;
    my $u_cnt = sprintf('%b', $u) =~ tr/1//;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2020-02-18 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (75 votes). Check out past polls.

    Notices?