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
For the metacharacters case, how about this:
my $re = do { local $" = '\E|\Q'; qr/\Q@array\E/; };
That lets you ditch the map and array refernceing/dereferencing inside the regex. Though it is arguably not as clear.
----
send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.
|
---|