FYI on Posting at Perlmonks in-a-nutshell; put your paragraphs inside <p></p> tags, and your code inside <code></code>. In your browser, select "view source" on this page and look at this post. It should show you (kind of...) the extra tags and their placement, which you can compare with what this post actually looks like. Also, you can preview your post as many times as you like until it looks right

As you said yourself, the code you've written may be stupidly over-complicated... but I'm assuming you're posting here not because of the code itself, but because the code produces an apparent bug with the Perl interpreter...

I found the debug switch use re qw{eval Debug ALL};, gives the extra output below:

Compiling REx "(?(?{$_ =~ |$regex (\w+ \w+)(?=\1)|})(?{s|$1||})|(?{s|$ +1 \w+"... Starting first pass (sizing) >(?(?{$_ =~... | 1| reg | | brnc | | piec | | atom >?(?{$_ =~ ... | | reg >?{$_ =~ |$... | 2| reg >(?{s|$1||}... | 6| brnc | | piec | | atom >?{s|$1||})... | | reg >(?{s|$1 \w... | 12| brnc | | piec | | atom >?{s|$1 \w+... | | reg Required size 16 nodes Starting second pass (creation) >(?(?{$_ =~... | 1| reg | | brnc | | piec | | atom >?(?{$_ =~ ... | | reg >?{$_ =~ |$... | 2| reg panic: top_env C:\Temp\panic>
And this is where i get stuck on where to go next with the investigation... perhaps another monk could shed further light?

As you've noted from perldiag, a panic usually indicates a bug...
Next steps would be to distill the REx down to the most simple form that produces the issue. Then checkout if its a known fault... (can another more enlightened monk comment on where and how faults with Perl can be queried?)

In reply to Re: Code Sub-Pattern Error "Panic: top_env" by desemondo
in thread Code Sub-Pattern Error "Panic: top_env" by urthwrm

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.