diff options
author | Mike Guy <mjtg@cam.ac.uk> | 2001-06-12 14:14:15 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-12 12:31:11 +0000 |
commit | af9219eeb845660a7947f94064c62c7fc5ce5900 (patch) | |
tree | 9fef84dc8051232b0e017a16ae985290905e5333 /pod/perlop.pod | |
parent | bc3002b9901eaebb02b0c0acbc544987b236730f (diff) | |
download | perl-af9219eeb845660a7947f94064c62c7fc5ce5900.tar.gz |
Re: [ID 20010612.001] out of memory during regex compilation
Message-Id: <E159n3n-0000xa-00@draco.cus.cam.ac.uk>
p4raw-id: //depot/perl@10530
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r-- | pod/perlop.pod | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod index ec96f04584..1dd564e51d 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<join $", @array>. "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. |