$ perl -le ' > $str = q{abcDEfghIjkLmn}; > @arr = split m{([A-Z]+)}, $str; > print for @arr;' abc DE fgh I jk L mn $