in reply to Re: matching elements in a list in a logical OR fashion
in thread matching elements in a list in a logical OR fashion
use strict; use Regex::PreSuf; my @array = qw( foo bar baz ); my $re = presuf(@array); my $bigstring = 'whatever'; if ($bigstring =~ /$re/o) { print "it matched"; }
|
|---|