in reply to matching whole words only
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: matching whole words only
by dirtdog (Monk) on Feb 27, 2015 at 16:02 UTC |