Oh Ben,

Hash keys MUST be unique!

If you say something like:

Acorn Drive => A
Acorn Drive => B

Acorn Drive will have the value B (the last
one overwrites to previous).

What you may need is a hash of arrays:

Acorn Drive => ['A', 'B',]

Aloha => Beau.

-----Original Message-----
From: Ben Crane [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 4:39 AM
To: [EMAIL PROTECTED]
Subject: modification on hashes/unique values


Hi,

a slight change to the previous mail: if I've got a
key (e.g. A, and I have 3 or 4 keys (which are all A)
which correspond to different data...

e.g. Acorn Drive is a key, but there are several parts
the make up Acorn Drive...I want a key (Acorn drive)
to be able to refer to EVERY part of it...

so If I've got a hash, that looks like:

Acorn Drive => A
Acorn Drive => B
etc...

surely, if I match one key (Acorn Drive), it'll make
multiple matches through the hash?? at the moment, I
enter a key, and it only returns one record...have a
missed the point completely??

how do I make multiple matches within a hash with one
key only?

Ben

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




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

Reply via email to