$a = "Is this a bug?"; $a =~ s/bug/$& x 2/; print $a; # Is this a bug x 2? $a = "Is this a bug?"; $a =~ s/bug/$& x 2/e; print $a; # Is this a bugbug?