Help for this page
sub prog_replace_string { my ($replace_this, $with_this, $string) = @_; $string =~ s{\Q$replace_this\E}{$with_this}g; $string; }
sub replace_vars { my ($string, $hash) = @_; ... my %vars = ( a => 1, b => 22, c => 333 ); print replace_vars('a: $a, b: $b, c: $c', \%vars);