$ perl -Mutf8 -mopen=:locale -e ' my $data = "this is a TEST SENTENCE Foo Bar GRUB jo аз co"; my @uc_strings = $data =~ /\b\p{Lu}+\b/g; print "@uc_strings\n"; ' TEST SENTENCE GRUB аз