Here is another alternative using unpack() --- should be somewhat more efficient, especially for sequence strings with more cuts:
sub gapify { my $s = shift; join '-', unpack join('A','',@_,'*'), $s; }
In reply to Re: Adding gaps to a sequence
by danger
in thread Adding gaps to a sequence
by ariels
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |