Thanks for this reply. I appreciate the comments and that, even though you had reservations about doing this in production code (which I would too, and this is not!), you had a go at answering the question I asked.
I'll share a bit more, just in case you're wondering what I'm thinking by going with an approach like this. It's really just a personal challenge to see if (and how) I could tackle something a different way than I normally would. Similar to obfu/JAPH/golf in that it's amusing and enlightening. I've never tried anything quite so arcane as to capture every instance of a repeating multi-line pattern within a pattern. I only got so far with it before I got stumped, which is why I naturally came here for sage advice next.
That's the main reason, anyway. The data itself was from a personal engineering project that quite literally exploded (and set off a few car alarms) after I got what I needed out of it. It's hence sort of unlikely I'll ever need to maintain this code, and even then, the much more difficult task would be rebuilding the thing, not to mention the municipal permit. :-)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||