"That's one of the reasons I think the reports aren't that helpful, even though I could just attribute it to incompetence: if you can't easily see what they owe you, you can't easily request your money."

Never attribute to malice that which is adequately explained by human stupidity :)

That said, bravo -- excellent work. I have just one suggestion: Have you perhaps considered using a SQL database (nothing major -- maybe something as simple as SQLite) to manage things? Your script could read one report, and generate the rows as INSERT statements, then read the other report, and fill in the missing data with UPDATE statements.

Perl is great for parsing the incoming data (especially given its heterogeneous nature), but SQL servers shine at the data manipulation you're doing (specifically, the 'inversion' you're performing, plus grouping by date).

Remember: Perl is a very flexible tool, just like a Swiss Army knife. But if I'm turning a lot of screws, I'm not going to reach for my keychain, even if it does have a mini screwdriver; I'm going to use a "real" screwdriver. Sure, my "real" screwdriver doesn't do anything else, but it's way better suited to turning screws.

--Stevie-O
$"=$,,$_=q>|\p4<6 8p<M/_|<('=> .q>.<4-KI<l|2$<6%s!<qn#F<>;$, .=pack'N*',"@{[unpack'C*',$_] }"for split/</;$_=$,,y[A-Z a-z] {}cd;print lc

In reply to Re: Perl, Authorize.Net, and Broken Kneecaps by Stevie-O
in thread Perl, Authorize.Net, and Broken Kneecaps by brian_d_foy

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.