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
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
|
---|
In Section
Seekers of Perl Wisdom