in reply to Re^2: reg. expr. multiple substitutions
in thread reg. expr. multiple substitutions
That would probably work, but I'm never quite sure that there is any benefit to pre-compiling a regex with qr// if you are going to then interpolate that into the m// or s/// construct to use it.
With m//, you can do: my $re = qr/.../; $string =~ $re; thus avoiding re-interpolating the compiled regex, but there is no way to do that with s///.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: reg. expr. multiple substitutions
by kennethk (Abbot) on May 17, 2012 at 15:24 UTC | |
by BrowserUk (Patriarch) on May 17, 2012 at 15:46 UTC | |
by dave_the_m (Monsignor) on May 17, 2012 at 16:01 UTC | |
by BrowserUk (Patriarch) on May 17, 2012 at 16:06 UTC | |
|
Re^4: reg. expr. multiple substitutions
by mbethke (Hermit) on May 17, 2012 at 15:38 UTC | |
by BrowserUk (Patriarch) on May 17, 2012 at 15:41 UTC |