my $thestring = "13,130,213"; my $thecheck = "13"; if($thestring =~ /$thecheck/){ print "$thecheck is in $thestring\n"; }