You're going to have to look through the entire array one way or another. If your data set has more than a few items in it, it will be more efficient to convert the array to a hash and do many lookups on that, instead of doing many searches on your array.
Snippets of code should be wrapped in
<code> tags not<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor