Hmmm... I'll have to go back and have a play with what you've suggested above. Before I noticed you'd come back again, I went off and had a play as promised, and came up with the following change to deal with the Order/Title issue :

if (/Distribution--/) { # Check to see if the Order/Title combo has been seen before if ($seen{$$hashReference{orderID},$$hashReference{title}}) { # Visual prompt for debugging print "Bollox\n"; next RECORD; } # End if else { # Add the "unseen" Order/Title combo to the hash $seen{$$hashReference{orderID},$$hashReference{title}}++; #Write the Order "header" info to the spreadsheet $worksheet->write($row,0,$$hashReference{fiscalCycle}); $worksheet->write($row,1,$$hashReference{vendorID}); $worksheet->write($row,2,$$hashReference{orderID}); $worksheet->write($row,3,$$hashReference{requisitionNum}); $worksheet->write($row,4,$$hashReference{title}); $worksheet->write($row,5,$$hashReference{'ISBN/ISSN'}); $worksheet->write($row,6,$$hashReference{copies});

And it SEEMS to be working ok so far - but that's only with a small subset of the data. About to branch out and run it on a larger subset and see how it goes with regard to both results and performance... or at least I will do once I fix the server I need to get the data from, which appears to have halted a couple of core services needed for me to get to it... never a dull moment ;)

As you can see I've not gotten a chance as yet to re-visit how/when I am doing the writing to Excel, but I'll do that once I've confirmed the functionality of the script as a whole, and once I've had a bit of a play with your suggestions also.

Thanks once again for the help... it's been VERY valuable and very much appreciated. I'm sure I could have done it without you... eventually... but to be frank - I don't have enough hair left to be able to spare what it would have cost me ;)


In reply to Re^14: How best to strip text from a file? by bobdabuilda
in thread How best to strip text from a file? by bobdabuilda

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.