Help for this page

Select Code to Download


  1. or download this
    #!perl -i
    
    # or:
    ...
      s/foo/bar/;
      print;
    }
    
  2. or download this
    perl -pi -e 's/bar/foo/g' myfile
  3. or download this
    if (/foo/) {
      s/foo/bar/g;
    }
    
    s/foo/bar/g;