Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: array of arrays

by davorg (Chancellor)
on Jun 29, 2009 at 13:29 UTC ( [id://775667]=note: print w/replies, xml ) Need Help??


in reply to array of arrays

I recommend the Perl data structures cookbook as a good way to learn about building complex data structures in Perl.

You've had a couple of explanations of the problems in your code. I wanted to mention something a bit deeper. You're creating an array where the indexes are the ids from your database. Unless your ids are small integers, then you're going to create a very sparse array (i.e. one with a lot of missing values that still take up memory). It might make more sense to consider a hash instead of an array.

--

See the Copyright notice on my home node.

Perl training courses

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-19 07:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found