use strict; use warnings; my $string = 'athis'; print $string =~ s/(.)(.)/$1.uc$2/egr;