Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Generate all unique combinations of 1 and 0 using specified length of "0"-string and count of 1's

by marioroy (Prior)
on Dec 29, 2020 at 05:01 UTC ( [id://11125914]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print "$_\n" for GenUniStrings(9, 25);
    
  2. or download this
    my ($numOnes, $strLen) = (9, 25);
    
    ...
    00000010
    00000001
    00000000
    
  3. or download this
    use strict;
    use warnings;
    ...
    } @input_data;
    
    print "$_\n" for @strings;
    
  4. or download this
    use strict;
    use warnings;
    ...
            MCE::relay { print "$_\n" for @strings; };
        }
    )->run;
    
  5. or download this
    $ time perl serial.pl >/dev/null
    
    ...
    user  0m7.067s
    sys   0m0.507s
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-28 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found