Help for this page

Select Code to Download


  1. or download this
    my $num_substitutions = $var =~ s/foo/bar/g;
    
  2. or download this
           s/PATTERN/REPLACEMENT/egimosx
                   Searches a string for a pattern, and if found, replaces
    + that
                   pattern with the replacement text and returns the numbe
    +r of
                   substitutions made.  Otherwise it returns false (specif
    +ically,
                   the empty string).