in reply to Simple filter from rows of input file
Perhaps you just need to chomp($seq)?
Also, if you don't want special characters in the SEQ file to be interpreted as part of the regex, you should write /\Q$seq\E/ (see quotemeta).