You change it as shown below.
$thestring = "13,130,213"; $thecheck = "13"; if ($thestring =~ /$thecheck/) { print "$thecheck is in $thestring"; }
Prasad
In reply to Re: Checking for occurrence in comma separated string
by prasadbabu
in thread Checking for occurrence in comma separated string
by Delusional
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |