I'm not sure why you are using $_ in the grep within the if block, but if you use $term as you did originally it will work.
In reply to Re: regex to return matched value from array
by JediWizard
in thread regex to return matched value from array
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |