Help for this page
$search = qr/pattern/;
s/$search/replace/g;
my $rep = sub { $_[0] =~ s/a/b/g }; ... $rep->($string); print "$string\n";