my $crc32=crc32("$sequence"); #check crc32 of sequence my $th=$dbh->prepare(qq(SELECT COUNT(1) FROM Sequence WHERE Seq_Checksum=$crc32)); #check if it already exists $th->execute(); my $test=$th->fetch()->[0]; print "$test\n"; #output if it exists