Given your approach, you might also want to add quotemeta support:if (@events = grep /\b$event\b/, @{ $region_of_state{$region_of_state} +}) {
if (@events = grep /\b\Q$event\E\b/, @{ $region_of_state{$region_of_st +ate}}) {
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: matching whole words only
by kennethk
in thread matching whole words only
by dirtdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |