note
BillKSmith
There is a maximum of only ten comparisons. By your criteria, the OP had it right in the first place. The ternary operator, with the format from the book "Perl Best Practices", cleans it slightly.
<c>
my $match = $RB1 == $RB2 ? 1
: $RB1 == $WR1 ? 1
: $RB1 == $WR2 ? 1
: $RB1 == $TE1 ? 1
: $RB2 == $WR1 ? 1
: $RB2 == $WR2 ? 1
: $RB2 == $TE1 ? 1
: $WR1 == $WR2 ? 1
: $WR1 == $TE1 ? 1
: $WR2 == $TE1 ? 1
: 0
;
</c>
UPDATE: Or even
<c>
my $match = $RB1 == $RB2 || $RB1 == $WR1 || $RB1 == $WR2 || $RB1 == $TE1
|| $RB2 == $WR1 || $RB2 == $WR2 || $RB2 == $TE1
|| $WR1 == $WR2 || $WR1 == $TE1
|| $WR2 == $TE1 ;
</c>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-957973">
Bill
</div></div>
1053458
1053566