Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#print all combinations of 6 ones and 12 zeros for( 0b000000000000111111..0b111111000000000000 ) { my $x = sprintf("%018b",$_); next unless $x =~ /^0*10*10*10*10*10*10*$/; printf "$x\n",$_; }
Edit Masem 2002-02-19 - Added CODE tags, changed title from "Is there a faster way to do this?"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: Is there a faster way to do this?
by tilly (Archbishop) on Feb 18, 2002 at 02:10 UTC | |
|
Re: Is there a faster way to do this?
by I0 (Priest) on Feb 18, 2002 at 02:51 UTC | |
|
Re: Is there a faster way to do this?
by cLive ;-) (Prior) on Feb 18, 2002 at 02:14 UTC | |
|
Re: Is there a faster way to do this?
by belg4mit (Prior) on Feb 18, 2002 at 01:48 UTC |