in reply to Re^2: Consolidating nstore arrays
in thread Consolidating nstore arrays

You are missing a . in your pattern:

my $filepattern = qr/(.*).foo__bar_ar/

Also, I'm totally confused about what is in your retrieve files.
Please show (in code blocks) at least the first twenty lines from a Data::Dumper or Data::Dump print of one of your "retrieve" files as it is immediately after it is read in.

Replies are listed 'Best First'.
Re^4: Consolidating nstore arrays
by Speed_Freak (Sexton) on Aug 31, 2017 at 20:29 UTC

    ah, thanks! Below is a dump from one file.

    $VAR1 = undef; $VAR2 = [ 1, '18.4', '7.6', '10.8', '0.584615384615385', 22, '4.0', 18, '0.307692307692308', '0.664861632672521', '0.968405008381221', '0.816633320526871' ]; $VAR3 = [ 0, '31.5', '18.9', '12.6', '0.75', '199.7', '29.2', '170.5', '0.255133245958934', '0.150796748317197', '0.968809826017511', '0.559803287167354' ]; $VAR4 = [ 0, '115.2', '35.9', '79.3', '0.475181998676373', '13.7', '8.3', '5.4', '0.754545454545455', '0.855054749249092', '0.272628302983597', '0.563841526116344' ]; $VAR5 = [ 0, '969.7', '1034.6', '-64.8999999999999', '1.03238038217832', '1607.6', '582.0', '1025.6', '0.531603945926197', '0.0340815410482703', '0.81304569847144', '0.423563619759855' ]; $VAR6 = [ 0, '3.2', '13.2', -10, '1.60975609756098', '22.2', '58.2', -36, '1.44776119402985', '0.000189855866797165', '0.000793472305521753', '0.000491664086159459' ]; $VAR7 = [ 0, 124, '24.9', '99.1', '0.334452652787105', '533.5', '764.2', '-230.7', '1.17777606534638', '0.959457725728336', '0.00783065425975528', '0.483644189994046' ];

    and so on for ~150k VAR's

      According to my documentation for Storable (perl v5.26.0) this output is not possible. nstore can only store one reference.

        According to my documentation for Storable (perl v5.26.0) this output is not possible. nstore can only store one reference.

        Looks like a beginner trap of Data::Dumper. To dump an array, you have to use Dumper(\@array), not Dumper(@array). If you use the latter, Data::Dumper assumes that you want to see one variable per array element. And in this case, the array(s) contain a total of about 150_000 elements, which explains the 150_000 variables listed by Data::Dumper.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

        hmm, I don't know what to say. The files are created by storing an array with nstore.