froodley has asked for the wisdom of the Perl Monks concerning the following question:

Oh, venerable monks,

I have read in a few places that, although a number of delimiters are allowed with the quote-like operators, a few have magic powers with individual operators. Can you please break-a-break-break break it down?

thanks!
froodley

Replies are listed 'Best First'.
Re: Quote-like Operator Delimiters
by kcott (Archbishop) on Jul 15, 2015 at 05:14 UTC

    G'day froodley,

    Welcome to the Monastery.

    There's three sections of perlop where you'll find that information. I've listed them below with some notes about the special delimiters they reference; however, I make no guarantee I've got them all. Also, my notes are brief and may contain oversimplifications: the doco has details.

    Quote and Quote-like Operators
    • See the table, at the start of this section, for quoted strings that don't interpolate when the delimiter is a single-quote. The remaining two sections have further details.
    Regexp Quote-Like Operators
    • qr{...} doesn't interpolate with single-quote delimiter.
    • m{...} doesn't require the 'm' with forward-slash delimiter.
    • m{...} only matches once with question-mark delimiter.
    • s{...}{...} doesn't interpolate with single-quote delimiter.
    Quote-Like Operators
    • qx{...} doesn't interpolate with single-quote delimiter.
    • <<EOF and <<"EOF" interpolate; <<'EOF' doesn't

    In addition, take a look at split for some special cases of the pattern, e.g. ' ' vs. / /.

    And the last one I can think of is setting $/ (the input record separator) to "" for paragraph mode. See perlvar for details of that one.

    — Ken

Re: Quote-like Operator Delimiters
by AnomalousMonk (Archbishop) on Jul 15, 2015 at 04:42 UTC
Re: Quote-like Operator Delimiters (docs)
by tye (Sage) on Jul 15, 2015 at 05:14 UTC

    Did you even glance at the documentation? The first paragraph is followed by a table that ends with the footnote "* unless the delimiter is ''". So there's one set of special cases right there. If you then simply search for "delim", you quickly find repeats of those cases plus one other set of special case. And I think that is all of them.

    - tye