On Thu, 17 Oct 2002, David Wheeler wrote: : On Thursday, October 17, 2002, at 11:49 AM, Shapiro, Jonathan wrote: : : > Well, let's look at a few possibilities: : > : > 1) if( $vec bit| $mask bit& $mask2 ) : > : > 2) if( $vec b| $mask b& $mask2 ) : > : > 3) if( $vec |b $mask &b $mask2 ) : > : > 4) if( $vec |bit $mask &bit $mask2 ) : > : > I think I would have an easier time explaining #4 to someone : : Yes, except that &bit is a subroutine reference, IIRC, not an operator. : That's why it makes more sense to put the punctuation character at the : end of the operator name.
Here's another approach: my @a is bitmap($a); my @b is bitmap($b); my @c is bitmap($c); @a = @b ^| @c; and then you get shift @a; for free. Larry