|
|
Author: comdog
Date: Sat Jun 7 08:15:28 2008
New Revision: 11384
Modified:
perlfaq/trunk/perlfaq6.pod
Log:
* Why does using $&, $`, or $' slow my program down?
+ add a paragraph about the new PErl 5.10 variables for
these guys: C<${^MATCH}>, C<${^PREMATCH}>, and C<${^POSTMATCH}>
Modified: perlfaq/trunk/perlfaq6.pod
==============================================================================
--- perlfaq/trunk/perlfaq6.pod (original)
+++ perlfaq/trunk/perlfaq6.pod Sat Jun 7 08:15:28 2008
@@ -807,6 +807,11 @@
essentially the same information, but without the risk of excessive
string copying.
+Perl 5.10 added three specials, C<${^MATCH}>, C<${^PREMATCH}>, and
+C<${^POSTMATCH}> to do the same job but without the global performance
+penalty. Pelr only sets these variables if you compile or execute the
+regular expression with the C</p> modifier.
+
=head2 What good is C<\G> in a regular expression?
X<\G>
|
|