in reply to Re^2: I need help with a bunch of "if/elsif statements (comparisons)"
in thread I need help with a bunch of "if/elsif statements (comparisons)"

Ok, I'm still not sure what exactly should happen but it seems you first want to classify both ids in the same way. This is a job for a subroutine, so that you don't have to do that twice:

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; }

Now that you have a well defined and (hopefully) well documented subroutine to do the preliminary work on each individual score, you can add the main code:

my $result_x= award_score($best_x,$block1,$position1); my $result_y= award_score($best_y,$block2,$position2); if ($result_x eq $result_y) { ... }

This is only a rough draft that you have to adapt, it is just to show you the principle. Somehow or other a similar method should work for you. If you need more parameters into the subroutine, just do that. If you need to return more than one result, likewise no problem. If your main routine looks so simple that someone else could understand it immediately you have won

PS: variable names like $nTE2 are cryptic and not very helpful if you or someone else has to understand the code one year later