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///.
In reply to Re^3: reg. expr. multiple substitutions
by BrowserUk
in thread reg. expr. multiple substitutions
by silentius
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |