Sweet jesus and sweet sassy molassy, you *Sir* are a gentleman AND a scholar.

Next step is for me to a) apply it to the thousands of data points, and b) figure out how it works!

You guys at perlmonks are amazing at figuring code out and helping come up with awesome solutions, but for newbie programmers, it's hard to learn from your examples because they're complex and have no comments! If you don't mind, could you help me understand a little more how your code works, maybe in PM? I hate taking without understanding the how and why behind the scenes. Or maybe I could just ask a few questions?

As an aside, I figured out a solution as well, but it took me about 15 hours, was ~250 lines of code and went through every type conditional overlap case (ie, a is within b, b is within a, a begins overlap with b, b begins overlap with a, a and b start together b ends first, a and b start together a ends first, a and b end together a starts first, a and b end together b starts first .... a lot of 'if thens', and for each of those a case where a is bigger and a case where b is bigger). Your solution is so much more elegant and ... win.

Thank you for the help!!!

-Alan

In reply to Re^2: Date Array Convolution by alanonymous
in thread Date Array Convolution by alanonymous

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.