That's simpler and probably faster than what I had in mind here. Combined with an idea from Discipulus:
c:\@Work\Perl\monks>perl -wMstrict -le
"my $consonants = qr{ [^aeiouAEIOU]+ }xms;
;;
my $s = qq{four score\nand seven\nyears ago\nour fathers\n};
print qq{>$s<};
;;
open my $fh, '<', \$s or die qq{opening in-memory: $!};
;;
process() while <$fh>;
;;
sub process {
chomp;
s{ ($consonants) }{\U$1}xmsg;
print qq{>$_<};
}
"
>four score
and seven
years ago
our fathers
<
>FouR SCoRe<
>aND SeVeN<
>YeaRS aGo<
>ouR FaTHeRS<
Give a man a fish: <%-{-{-{-<