in reply to Re^2: Regex and array
in thread Regex and array
my @array = qw( ciccio paperino palla gigio pluto ); my $TestReStr = join("|", map { "(${_})" } @array); my $TestRe = qr/$TestReStr/; my $test = 'pluto'; print "It matched!\n" if $test =~ $TestRe ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Regex and array
by Deus Ex (Scribe) on May 26, 2010 at 09:50 UTC |