#!/usr/bin/perl
$seq ="CGGTTAATGGGAATACGCGGATAAGGCGAAATGCACCACGACGCCATAATTTGAAGGATG";
#            ^^^............^^^      ^^^..................^^^   ^^^

while ( $seq =~ /ATG(([ATGC]{3})+)(TAG|TAA|TGA)/g ) {
    #print "$1\n";
    push @arr, $1;
}
print "@arr\n";

