Help for this page

Select Code to Download


  1. or download this
    my $a = "$";
    my $b = "$";
    ...
    $a =~ s/$b/$c/g;
    
    print "a=$a\n";
    
  2. or download this
    # conceptually, the following is like $a=~s/$b/$c/, but is safe if $b 
    +has metacharacters in it
    sub string_substitution_one {
    ...
      }
      return $found;
    }