From: Mike Guy Date: Tue, 12 Jun 2001 13:14:15 +0000 (+0100) Subject: Re: [ID 20010612.001] out of memory during regex compilation X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=af9219eeb845660a7947f94064c62c7fc5ce5900;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20010612.001] out of memory during regex compilation Message-Id: p4raw-id: //depot/perl@10530 --- diff --git a/pod/perlop.pod b/pod/perlop.pod index ec96f04..1dd564e 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -658,13 +658,15 @@ any pair of delimiters you choose. Customary Generic Meaning Interpolates '' q{} Literal no "" qq{} Literal yes - `` qx{} Command yes (unless '' is delimiter) + `` qx{} Command yes* qw{} Word list no - // m{} Pattern match yes (unless '' is delimiter) - qr{} Pattern yes (unless '' is delimiter) - s{}{} Substitution yes (unless '' is delimiter) + // m{} Pattern match yes* + qr{} Pattern yes* + s{}{} Substitution yes* tr{}{} Transliteration no (but see below) + * unless the delimiter is ''. + Non-bracketing delimiters use the same character fore and aft, but the four sorts of brackets (round, angle, square, curly) will all nest, which means that @@ -734,6 +736,15 @@ and although they often accept just C<"\012">, they seldom tolerate just C<"\015">. If you get in the habit of using C<"\n"> for networking, you may be burned some day. +Subscripted variables such as C<$a[3]> or C<$href->{key}[0]> are also +interpolated, as are array and hash slices. But method calls +such as C<$obj->meth> are not interpolated. + +Interpolating an array or slice interpolates the elements in order, +separated by the value of C<$">, so is equivalent to interpolating +C. "Punctuation" arrays such C<@+> are not +interpolated. + You cannot include a literal C<$> or C<@> within a C<\Q> sequence. An unescaped C<$> or C<@> interpolates the corresponding variable, while escaping will cause the literal string C<\$> to be inserted.