Why do you need to traverse the entire hash? Just go directly to that key.
my %hash = (foo => 'bar', baz => 'biff'); my $scalar = $hash{foo};
You should probably read perldoc perldata.
In reply to Re: how to get a value corresponding to a key
by dorward
in thread how to get a value corresponding to a key
by s_gaurav1091
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |