Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^6: Consolidating nstore arrays

by afoken (Chancellor)
on Sep 01, 2017 at 06:51 UTC ( [id://1198498]=note: print w/replies, xml ) Need Help??


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

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". ;-)

Replies are listed 'Best First'.
Re^7: Consolidating nstore arrays
by Speed_Freak (Sexton) on Sep 01, 2017 at 11:42 UTC

    ahh, I see the difference!

    $VAR1 = [ undef, [ 1, '18.4', '7.6', '10.8', '0.584615384615385', 22, '4.0', 18, '0.307692307692308', '0.664861632672521', '0.968405008381221', '0.816633320526871' ], [ 0, '31.5', '18.9', '12.6', '0.75', '199.7', '29.2', '170.5', '0.255133245958934', '0.150796748317197', '0.968809826017511', '0.559803287167354' ], [ 0, '115.2', '35.9', '79.3', '0.475181998676373', '13.7', '8.3', '5.4', '0.754545454545455', '0.855054749249092', '0.272628302983597', '0.563841526116344' ], [ 0, '969.7', '1034.6', '-64.8999999999999', '1.03238038217832', '1607.6', '582.0', '1025.6', '0.531603945926197', '0.0340815410482703', '0.81304569847144', '0.423563619759855' ], [ 0, '3.2', '13.2', -10, '1.60975609756098', '22.2', '58.2', -36, '1.44776119402985', '0.000189855866797165', '0.000793472305521753', '0.000491664086159459' ], [ 0, 124, '24.9', '99.1', '0.334452652787105', '533.5', '764.2', '-230.7', '1.17777606534638', '0.959457725728336', '0.00783065425975528', '0.483644189994046' ], [ 0, '23.1', '21.3', '1.8', '0.959459459459459', '111.4', '35.7', '75.7', '0.485384092454113', '0.051736839732654', '0.841995362489232', '0.446866101110943' ], [ 0, '65.2', '106.7', '-41.5', '1.24141942990111', '10.5', '23.1', '-12.6', '1.375', '0.00457360051269834', '0.00151695997213462', '0.00304528024241648' ], [ 0, '4309.7', '162.2', '4147.5', '0.0725418725821239', '5949.4', '350.9', '5598.5', '0.111391521038681', '0.995577034355054', '0.993485851801997', '0.994531443078526' ],

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1198498]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 11:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found