use strict; use warnings; my $str = 'Patron @FirstName@ @LastName@ has filled out the @FormName@ form. Please send them an email at @EmailAddress@.'; print "$str\n"; $str =~ s/\@(.*?)\@/\@$1<\/B>\@/g; print "$str\n";