Regardsuse List::Util qw(first); my @arr=('cool','guy','here'); my $str1="I am cool"; my $hit = first{ $str1 =~ /\Q$_/ } @arr; print "Matched $hit";
In reply to Re: Mathching an array in regex
by mwah
in thread Mathching an array in regex
by narainhere
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |