in reply to Re: Mathching an array in regex
in thread Mathching an array in regex
#!/usr/bin/perl use strict; use warnings; my @arr=('cool','guy','here'); my $str1="cool guy here"; if($str1 =~ m/@arr/){ print "Matched"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Mathching an array in regex
by Krambambuli (Curate) on Oct 12, 2007 at 12:46 UTC |