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