my $string = 'somechar acters'; if ($string =~ /(int)|(char)|(bool)|(long)/){ print "matches\n"; } #### matches