#!/usr/bin/perl -w use strict; my @query1; my @subject1; my $query2; my $subject2; my $i=0; while (){ if ($query2=~ m/Query\s+\d+\s+\(S+)\s+\d+/){ @query1=split (//,$1); } if ($subject2=~ m/Sbjct\s+\(d+)\s+\(S+)\s+\d+/){ @subject1=split(//,$3); } if ($query2[$i] eq "*" ){ if ($subject2[$i] eq "C" || $subject2[$i] eq "c"){ print "posicion",$i+$2,"\n"; } } $i=$i+1; }