$ perl -MO=Deparse test.pl use warnings; use strict 'refs'; my(@arr) = ('cool', 'guy', 'here'); my $str1 = 'I am cool'; if ($str1 =~ /@arr/) { print 'Matched'; } test.pl syntax OK