in reply to Re^2: 'Holy in one' another Golf Game!
in thread 'Holy in one' another Golf Game!

You have the right idea, but extrapolate it for all the bits of $a, $b, and $c. The $c is essentially a multichannel multiplexer for inputs $a and $b. It specifies whether to select the bit from $a or $b for each digit of the output.

So with:

my $a = 0b10101010; my $b = 0b11001100; my $c = 0b11110000; #result: 11001010
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
Re^4: 'Holy in one' another Golf Game!
by tadman (Prior) on Jul 27, 2001 at 13:30 UTC
    When you said "multichannel multiplexer" it all made sense. How about this one, at 20 characters:
    sub X{ ($_=pop)&pop|~$_&pop }
      Next time I'll remember not to make sense :) Nice shot!
         MeowChow                                   
                     s aamecha.s a..a\u$&owag.print