Help for this page

Select Code to Download


  1. or download this
    $string = "fooar"
    $string =~ s/(foo|bar)/b/g;
    print $string;
    
  2. or download this
    $string = "fooar"
    $string =~ s/$_/b/g for (qr/foo/, qr/bar/);
    $print $string;