This is going to be a terrible post, because I'm starting from scratch here... But I have a variable number of files housed in a scratch directory that has been created in whatever project directory I am working out of at the time. (the project directory will change, and so will the file count.) I need to target a specific set of arrays (some of the files were created from arrays) based on their name, and those arrays have been created using nstore.

So I need to search the project directory for the scratch folder, then find all of the files that match this pattern: "thing1_(ABC-def1g234567).foo__bar_ar"

Then I need to pull out the data from one column(lets say 5)for every row from each array and place them in a report.(there are 150k rows in each file.

the final report would be something like:
Number, thing1, thing2, thing3, thing4
1, 0.55, 0.345, 0.243, 0.567
2, 0.678, 0.3, 0.4563, 0.546
3, 0.3243, 0.533, 0.44, 0.7

the numbers in the first column would need to be populated, but would correspond to the row that the data was read from. (each file has the same format, but the number isn't stored in those arrays.)

#this isn't really code, just my thoughts #!/usr/bin/perl -w use strict; use FindBin; use Data::Dumper; use DBI; use Storable qw(nstore retrieve); #something that looks for the scratch directory in the current directo +ry #something that looks for any files matching the pattern thing1_(ABC-d +ef1g234567).foo__bar_ar #something that cycles through each file one at a time, pulling all of + the rows for [5] and pushing them in order into an excel file matchi +ng the report format

I'm not asking for turn key code, I'm just looking for some guidance towards the donkey before I start trying to stick a tail on it. Thanks in advance!


In reply to Consolidating nstore arrays by Speed_Freak

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.