in reply to Re: get substring when you know START and END???
in thread get substring when you know START and END???

So you are using 1 based numbering and you need to do the following:

use strict; use warnings; my $seq= 'ABCDEFGHIJKLM'; my $start=5; my $end=7; print substr $seq, $start - 1, ($end - $start) + 1;

Prints:

EFG

DWIM is Perl's answer to Gödel