http://qs321.pair.com?node_id=704929

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm try to extract a sequence of upper case words. Using the following code works for just one word though. How do I modify my regex telling it to grab all instances of UC words in a row?
my $data = 'this is a TEST SENTENCE Foo Bar'; my $uc_string = $1 if ($data =~ /([A-Z]+)\b/); # This grabs 'TEST' but not 'TEST SENTENCE' ???
Thanks