in reply to Re: Regex and array
in thread Regex and array

grep{print "$_\n" if ($r =~ /$_/g)}@array;
for (@array) { print "$_\n" if ($r =~ /$_/); }