Similar, but better like this, less error prone (and a little faster probably)
my $seq = qw(CCCTCTCTCCCAGGGGCA); my @parts = $seq =~ /[CGTAU]{3}/sg; foreach my $codon(@parts){print $codon," "}
In reply to Re: Fast Way to Split String in to Chunk of Equal Length
by pvaldes
in thread Fast Way to Split String in to Chunk of Equal Length
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |