in reply to Mathching an array in regex

you are almost there, do it like this
#!/usr/bin/perl -l use strict ; use warnings ; my @arr= qw(cool guy here); my $str1="I am cool"; local $" = "|" ; if($str1 =~ m/@arr/){ print "Matched"; }
Cheers
LuCa