in reply to Re: get substring when you know START and END???
in thread get substring when you know START and END???
# # 1 2 3 # 01234567890123456789012345678901234 my $seq = "LPNTGVTNNAYMPLLGIIGLVTSFSLLGLXKARKD"; # # Note that substr counts offsets from zero so adjust # if you are counting from one. my $start = 5; my $end = 10; my $length = $end - $start + 1; my $cut = substr $seq, $start, $length; print "$cut\n";
this prints
VTNNAY
Cheers,
JohnGG
|
|---|