[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding item in simple array
However, I cannot access either of the links mentioned below - i get the
"The page you're looking for
is no longer available."
Any alternative suggestions ?
At 19:48 08/12/2000, you wrote:
On Fri, 8 Dec 2000, Miriam Blake
> Is there an easy way just to test for the existence of something in
> simple array (not a hash)?
> I have $item and I want to see if it exists in @array and I don't
> to do a foreach over @array every time...
Scratch that last message of mine, where I suggested something that
perhaps should not have suggested.
One of the best ways of doing what you ask is to use not arrays,
hashes. Or, if changing to a hash is impractical, check out some of
creative uses of shadow hashes at the following location:
Alternately, jump to
for the question "How can I tell whether a list or array contains
Traverse Area District Library / Traverse Community Network
This message has been checked for all known viruses by Star Internet
through the MessageLabs Virus Control Centre. For further information
Talis Information Ltd.
Birmingham Research Park
Birmingham Phone : +44 (0)121 471 1179
B15 2SQ Fax : +44 (0)121 472 0298
United Kingdom E-Mail: G.B.Evans@talis.com
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
Any views or personal opinions expressed within this email may not be those of Talis Information Ltd.
The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited.