From: Simon Krahnke Date: 2008-05-03T10:05:06+09:00 Subject: Re: Extracting a value from an array * I�aki Baz Castillo (00:07) schrieb: > El Viernes, 2 de Mayo de 2008, Simon Krahnke escribi�: >> That's simply the wrong data structure for the task. So the question is: >> why not use a Hash? > > Maybe Yeah, maybe, or maybe not. That's why I ask. > because in some text protocol (as HTTP or SIP) there can be some headers > appearing more than one time (being completely valid). You can use an Array as the value. > Also a header name can be case insensitive and this requires a > extension of the Hash class or delegation. Or I just use the lower case representation as the key. The only case where you just can't use a Hash is when there is an order on the elements that can't be reconstructed. But even then I can just put the Hash keys in an additional Array. mfg, simon .... l