Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Adding to hash that contains an array of arrays

by eppo (Novice)
on Jan 29, 2014 at 20:34 UTC ( [id://1072577]=note: print w/replies, xml ) Need Help??


in reply to Re: Adding to hash that contains an array of arrays
in thread Adding to hash that contains an array of arrays

What i'm trying to do is this, I have an sql table, in the table, there are 2 columns that contain user id's. I'm trying to collect the data for each of the id's. this data was going to be written to an xlsx file. the data needed to create the xlsx file is an array of arrays. so i was thinking about making a hash, that contains each of the id's, and then for each of those id's it points to an array of arrays that I can use to create the spreadsheet. Is there some other way that would be more elegant to get this done?

  • Comment on Re^2: Adding to hash that contains an array of arrays

Replies are listed 'Best First'.
Re^3: Adding to hash that contains an array of arrays
by FloydATC (Deacon) on Jan 30, 2014 at 12:39 UTC

    Where you get the data from is irrelevant, the "push" demonstrated by both moritz and mewsham manipulates your data structure in exactly the way you're asking for.

    It adds an array reference (what an array of arrays really contains) to the array in your hash.

    -- FloydATC

    Time flies when you don't know what you're doing

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found