On 4 Apr 2003, Rado Petrik wrote: > I have two number > > $a=6; #binary - 0110 > $b=10; # 1010 > > I need work this operation "a OR b" > 0110 - 6 > OR 1010 - 10 > --------- > 1110 - 14 this is true; > > buy when I use this operator "^" in perl > > $a^$b then output is 12 > > 0110 - 6 > OR 1010 - 10 > --------- > 1100 - 12 false;
^ is XOR, not OR. You want to use | for bitwise OR. $ perl -e 'print 6 | 10' 14 -- Brett -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]