in reply to Simple line parse question

Don't know about speed, but my own preference would be for something along the lines of:

>perl -wMstrict -le "my $s = 'aa b: CCC DD. eee, ff ggg?'; my $word = qr{ [[:alpha:]]+ }xms; my @words = $s =~ m{ $word }xmsg; my $result = join q{}, @words[2,3]; print qq{'$result'}; " 'CCCDD'

This allows better definition and control of what a 'word' is.

Updates:

  1. One can also avoid the intermediate  @words array as in the OP with the slightly faster
        my $result = join q{}, ($s =~ m{ $word }xmsg)[2,3];
  2. Improved code example slightly to try to show that naive splitting on whitespace might produce unintended results. Better, IMO, to define and extract the thing itself rather than try to define and eliminate everything you're not interested in.