$string =~ s/find /replace/g; $string =~ s/find /replace/gs; #### open (FIN, "$inputfile") || die("Cannot read the input file"); local $/; $string = ; close FIN; $string =~ s/find /replace/g; #and $string =~ s/find /replace/gs;