$regex = "ISOLATION"; if ($dataline =~ m/$regex/"; print "Found a match!\n"; } else { print "No match!\n"; }