perlsen has asked for the wisdom of the Perl Monks concerning the following question:
$string =~ s/find /replace/g; $string =~ s/find /replace/gs;
open (FIN, "$inputfile") || die("Cannot read the input file"); local $/; $string = <FIN>; close FIN; $string =~ s/find /replace/g; #and $string =~ s/find /replace/gs;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Which is the efficient pattern matching modifiers (s///g; or s///gs;)?
by Fletch (Bishop) on Apr 13, 2006 at 13:06 UTC | |
by perlsen (Chaplain) on Apr 13, 2006 at 13:10 UTC | |
|
Re: Which is the efficient pattern matching modifiers (s///g; or s///gs;)?
by Anonymous Monk on Apr 13, 2006 at 13:16 UTC | |
|
Re: Which is the efficient pattern matching modifiers (s///g; or s///gs;)?
by QM (Parson) on Apr 14, 2006 at 16:41 UTC |