First off, let me say many thanks to everyone who gave me feedback on this problem, with just six replies I've gained not only a solution to my problem, but also jumped a couple of steps forward in my benchmarking, debugging, and just coding in general.

Now the specifics:

1. First off, graff was absolutely correct, the second half of the source/dest regexp should've been: ((?:\d{1,3}\.){3}\d{1,3})
But all things considered, I think I'll be storing smaller chunks of regexps in variables like graff shows, (read as: All along I should've been storing smaller...)

2. It seems the root of all my troubles was the memory intensive file-slurp... the process was originally designed to run on LWP::UserAgent->content returns, but was later modified to work on the local filesystem instead, I never modded the structure to be able to use line-by-line mode. I was uselessly throwing away resources which was the source of all my troubles.

In reply to Re: Same code, same data, different execution times? by tekkie
in thread Same code, same data, different execution times? by tekkie

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.