Re: FAQ 6.9 What is "/o" really for?
- From: Bart Lateur <bart.lateur@xxxxxxxxxx>
- Date: Thu, 30 Jun 2005 09:52:16 GMT
PerlFAQ Server wrote:
> Using a variable in a regular expression match forces a re-evaluation
> (and perhaps recompilation) each time the regular expression is
> encountered.
Hmm, isn't this info outdated? At least the latest versions of Perl (and
already since 5.6.x at least, IIRC), do cache the string value and don't
recompile the regex is it hasn't changed. In many of my tests, /$pat/o
was *not* faster than just /$pat/, with an unchanged variable.
Anyway, I'd like to see the things I mention here off the top of my
head, incorporated into this FAQ entry.
--
Bart.
.
- References:
- FAQ 6.9 What is "/o" really for?
- From: PerlFAQ Server
- FAQ 6.9 What is "/o" really for?
- Prev by Date: Re: Copy local Groups -- Get SID
- Next by Date: FAQ 3.23 How can I get "#!perl" to work on [MS-DOS,NT,...]?
- Previous by thread: FAQ 6.9 What is "/o" really for?
- Next by thread: CGI output to null?
- Index(es):
Relevant Pages
|