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<}; ;; my $offset = 0; my $pos; while (0 <= ($pos = index $s, qq{\n}, $offset)) { substr($s, $offset, $pos) =~ s{ ($consonants) }{\U$1}xmsg; $offset = ++$pos; } print qq{>$s<}; " >four score and seven years ago our fathers < >FouR SCoRe aND SeVeN YeaRS aGo ouR FaTHeRS <