use strict;
use warnings;

my $string = 'MALWCMRALPLCLALALCAWGPDPACAFVN';
my @a = split(/A/, $string); 
my $join_A = join ("A,", @a);
my @starray = split(/,/, $join_A);

print "Enter L positions\n";
my @ARGV = <STDIN>;
my $regex = "^(.{" . $ARGV[0] . "}|.{" . $ARGV[1] . "})L" ;
my @selstrings = grep( /$regex/, @starray ) ;
