$thestring = "15,130,213"; $thecheck = "13"; if ($thestring =~ /$thecheck/) { print "$thecheck is in $thestring"; } else { print "$thecheck is not in $thestring"; }