my $text = 'Patron @FirstName@ @LastName@ has filled out the @FormName@ form. Please send them an email at EmailAddress@.'; my $c=0; $text =~ s/\@([^\@]+)/$c++;($c%2)?"\@$1<\/b>":"\@$1"/eg;