my @key_matches = grep { /cok/ } keys %prices
NB: you can have multiple matches.
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Check if key exist in hash but not exact match
by LanX
in thread Check if key exist in hash but not exact match
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |