in reply to How do I check to see if a value in a hash is equal to something?
Another way, of you are only interested in knowing if the value is in the hash, without knowing the key, could be:
This is not particularly space efficient if the hash is large. See also the second solution suggested in the FAQ mentioned above.$is_in_hash=grep /^Superman$/,values(%hash);
--ZZamboni
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Answer: How do I check to see if a value in a hash is equal to something?
by merlyn (Sage) on May 23, 2000 at 19:47 UTC |