Hmm... maybe I'm being dumb here, but I think that if this is doing anything at all, it is doing the wrong thing. Let me start nit-picking:
  1. you drop $delimiter into a /x regexp, but it is elsewhere de-/x'ed as (?-x:$delimiter)... so if someone passes in a $delimiter containing whitespace, it will be interpretted differently by your addition than elsewhere.
  2. you capture your new $delimiter, but you aren't storing the value? Odd, you could just drop the parenthes or make them (?:$delimiter) or, as to the previous point, (?-x:$delimiter)
  3. the other primary sub-regexes are anchored at the beginning of the line, so they can tell what came before the ending sub-regex, but your new one is not.
  4. excepting, of course, for the /x-or-not-/x question surrounding $delimiter, anything caught by your new regex should have been caught by the regex for unquoted stuff (unless, of course, it had an open quote with no matching close quote)

Can you give me the calling context (the value of $delimiter and $line)?


------------
:Wq
Not an editor command: Wq

In reply to Re: small change - evil consequences? by etcshadow
in thread small change to Text::ParseWords - evil consequences? by selena

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.