in reply to Re: Re: Matching a KEY in a HASH
in thread Matching a KEY in a HASH
The point of a hash is that a hash itself can find a value for a given key trivially.
There's no searching required. If there's an element with a key of $variable, then $value_you_are_looking_for has it. Otherwise, it gets undef.$value_you_are_looking_for = $category{$variable};
-- Randal L. Schwartz, Perl hacker
|
|---|