if (grep/^keyvalue$/, keys %data) { print "yes"; } # and if (defined $data{keyvalue}) { print "yes"; } # and if you also are sure there is value data in your hash if ($data{keyvalue}) { print "yes"; }
In reply to Re: What is the best way to find the key is exists or not in a hash ?
by vladdrak
in thread What is the best way to find the key is exists or not in a hash ?
by swaroop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |