You can try \b word boundary pattern:
print "found\n" if $list =~ m/\bvalue1\b/;
... or use Regexp::Keywords ;-)
In reply to Re: reg exp to find presence of value in a list of comma seperated list
by vitoco
in thread reg exp to find presence of value in a list of comma seperated list
by kgforperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |