Help for this page

Select Code to Download


  1. or download this
    # version 1
    ## problem, does not skip comments
    ...
        $text =~ s/$pay/$my_replacement{$pat}/g;
    }
    print $text;
    
  2. or download this
    while (<fp>) {
        if (!m/^\s*\/\//) {
    ...
        $text =~ s/$pay/$my_replacement{$pat}/g;
    }
    print $text;