On Thursday, June 5, 2003, at 09:26 AM, Stuart White wrote:

I've a problem that I think is best solved with
multi-dimensional hashes.  However, the reference that
I'm using doesn't really cover them.  Does anyone know
where I might find some tutorial article of some sort
with an example or two on multi-dimensional hashes?

I know that the syntax for referring to an element
within the inner hash is:
$hash1[$hash2[$hash2key]]

Okay, we agree, you need to know more. :)


You are indexing into those, which would make them arrays, not hashes.

I also don't know what kind of setup you're talking about there, but traditional Perl multidimensional structures are closer to:

my @array = ( [1..3], [4..6], [7..9] );
print "$array[1][2]\n"; # prints 6

but something tells me I should know more.  If someone
can point me in the right direction, I'd appreciate
it.

Programming Perl has a nice chapter on Data Structures, but even closer to home, try:


perldoc perldsc

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to