Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: bit array comparison

by Athanasius (Archbishop)
on Oct 23, 2019 at 03:05 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11107872]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-19 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found