Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
dddddddddBBBBBBBBBBBBDDDDDDDDBBBBBBBBBBBBBBddddddddddddddddddddBBBBBBB +BBBBBBBDDBBBBBBBBddddddddddddd
use strict; use warnings; my $seq = 'dddddddddBBBBBBBBBBBBDDDDDDDDBBBBBBBBBBBBBBdddddddddddddddd +ddddBBBBBBBBBBBBBBDDBBBBBBBBddddddddddddd'; while($seq=~/(B+)/g) { my $seg=$1; my $seg_length=length($seg); my $seg_start = index ($seq, $seg); my $seg_end=$seg_start+$seg_length; print $seg."|".$seg_start."-".$seg_end."\n"; }
|
---|