http://www.perlmonks.org?node_id=1016438


in reply to Seeking a better way to do it

Use grep!!!

my $char_list = "Enter Iago, Othello, and others"; my @Word_List = grep { /[A-Z]\w+/ } split(/\W/, $char_list); print "@Word_List\n";
Update:

Simple way with regular expression,

my $char_list = "Enter Iago, Othello, and others"; my @Word_List; @Word_List = ($char_list =~ /([A-Z]\w+)/g); print "@Word_List\n";