Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: need help in creating multi dimensional array

by misterb101 (Sexton)
on Feb 10, 2006 at 14:51 UTC ( [id://529367]=note: print w/replies, xml ) Need Help??


in reply to Re: need help in creating multi dimensional array
in thread need help in creating multi dimensional array

yep, so if the indices in your arrays are arbitrary or if your multidimensional array is sparse (like a sparse matrix) you'd better use hashes of hashes.
for instance if you declare $a->[10000] = 1 it also autovivivies elements 0 until 9999 setting the value to undef. This takes up unnessessary (? difficult word;) space, and makes loops much more cumputation intensive.

Cheers,
Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-16 10:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found