or download this
# @a holds a list of string
my @a = ("a", "b", "c", "/", "\[", "\"");
...
#create a regex that matches every element in the array
my $re = do { qr/(@{[join ("|", map { quotemeta } @a)]})/ };
die "not a regex!" unless ref($re) eq "Regexp";