my @str=("MUXmh123","MUXho124"); foreach my $kplmr(@str) { my ($kplmrletter,$number) = split/\d/,$kplmr; my $strr=uc($kplmrletter)."-"; }