The definition of a hash requires that all keys are unique. To use a hash the way you want, you may need to make the value for the key "Acorn Drive" a pointer to an array containing the data you intend [A, B, ...]. You can use an "anonymous" array to hold the data you want. (This is what the advice "Acorn Drive => ['A', 'B',]" you received earlier actually does -- load the key "Acorn Drive" with a scalar which is a pointer to an array containing the values in the list; just be sure your program expects the value it gets from this hash to be a pointer to an array.)

Best regards,
Chris

On Monday, December 2, 2002, at 08:38 AM, Ben Crane wrote:

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