in reply to binary string
prints:perl -e 'for my $d(0..127){ for (0..3){ next unless ($d & 3<<($_+$_))==0; $count++; } }; print qq|\nCount=$count\n|'
I also considered using 'grep' instead of the inner loop - but this is somewhat clearer.
..to maintain is to slowly feel your soul, sanity and sentience ebb away as you become one with the Evil.
|
|---|