Ok, here's breaking into groups of 50 (had to make some changes to HTML-ize it for Perlmonks display, but you should get the idea):
Which looks like:c:\@Work\Perl\monks>perl -wMstrict -le "my $red = '<font color=\"red\">'; my $blue = '<font color=\"blue\">'; my $post = '</font>'; my $brk = qq{<br> \n}; ;; my $base = qr{ [ATCG] }xms; ;; my $sequence = 'GGCGCAACGCTGAGCAGCTGGCGCGTCCCGCGCGGCCCCAGTTCTGCGCAGCT +TCCCGAGGCTCCGCACCAGCCGCGCTTCTGCCGCCTGCAGGGCATT'; ;; my $colorized_seq = join '', map qq{$red$_$post$brk}, map { s{ ($base{1,10} \z) }{$blue$1$post}xms; $_; } $sequence =~ m{ $base{1,50} }xmsg ; print qq{[[ $colorized_seq]]}; " [[ <font color="red">GGCGCAACGCTGAGCAGCTGGCGCGTCCCGCGCGGCCCCA<font col +or="blue">GTTCTGCGCA</font></font><br> <font color="red">GCTTCCCGAGGCTCCGCACCAGCCGCGCTTCTGCCGCCT<font color=" +blue">GCAGGGCATT</font></font> <br> ]]
In reply to Re^2: Code optimization help and troubleshooting
by AnomalousMonk
in thread Code optimization help and troubleshooting
by newtoperlprog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |