my @highlights = ( 'foo', 'bar', 'baz', '\w*a\W+my\w*', # the ...a my... phrase example ); my $re = join '|', @highlights; $re = qr/\b($re)\b/i; local $/ = "\n\n"; # read in a para at a time while(){ s/$re/uc $1/ge; print; } __DATA__ Hello Foo, This is your friend Baz wondering if you would like to go to the bar to talk server foo. Barclays is a foobar bank BTW. So a Perlmonk and a Panda walk into a bar. Know I know you think this is going to be a joke but I saw the panda myself!