#!/usr/bin/perl use strict; use warnings; my @arr=('cool','guy','here'); my $str1="cool guy here"; if($str1 =~ m/@arr/){ print "Matched"; }