if( ($seq =~/^\w{2}A\w{6}T\w{2}[ACT]\w[^A{4}|^T{4}][GC]{4}[AT]/) && ( $seq !~ /[GC]{9}/) && ( $gcper >= 30 && $gcper <= 52) ) { Do something....;}