sub award_score { #awards one of three scores to a tupel of # best result,block and position. The scores are # ... my ($best,$block,$position)= @_; my $result="nothing"; if ($best<100 and $block<100) { ... $result='best_match-TE' } elsif { ... $result= ... } return $result; } #### my $result_x= award_score($best_x,$block1,$position1); my $result_y= award_score($best_y,$block2,$position2); if ($result_x eq $result_y) { ... }